Shifter
Description
The shifter shifts its input to the right by one if enabled (otherwise it implements the identity function).
If the shifter is enabled, the most significant bit of the output can be selected using the CARRY_SELECT
control line from one of the following:
- Carry flag: Current value of CF in the flags register
- Zero: Constant 0
- Sign bit:
Current value of SF in the flags register.The sign bit of the input operand. - Serial input: Value from I/O unit to enable certain I/O operations
Implementation in Hardware
The shifter itself is implemented with two 4-bit mux chips (74-157 shifterLow
and shifterHigh
).
The selection of the correct value to shift in is done using a decoder (74-153 carryMux
).
If the shifter is not enabled, the carry output from the ALU chips should just be passed through. If it is enabled, the last bit of the shifter input should be used as carry output. This selection is implemented using (our favorite part) a mux (74-157 shiftCarry
).
Schematic
As well as a separate carryMux
schematic which was easier to use for the final nested schematics.