Lab 3b: Pixel Array
Revision as of 18:18, 4 March 2025 by Lawrence Quizon (talk | contribs) (Created page with " == Background == You have been taught what ''encoders'' and ''multiplexers'' are. How do we use them? A significant amount of real-world logic is easier to think of in term...")
Background
You have been taught what encoders and multiplexers are. How do we use them?
A significant amount of real-world logic is easier to think of in terms of decoders and multiplexers. For example, a if/else statement is simply a multiplexer. A binary-to-7-segment decoder can be implemented as a simple idea with a decoder and 7 OR gates.
Instructions
Your assignment is as follows:
- Download the ALU template in UVLe.
- Implement an 8-bit ALU that can perform ADD, SUBTRACT, Bitwise AND, and Bitwise OR, depending on the input ALU_OP. Make sure it follows the table below. Additional constraint: DO NOT USE A SUBTRACTOR ARITHMETIC BLOCK TO IMPLEMENT SUBTRACTION.
- Implement the 4 flags Z, N, C, O.
Operation | ALU_OP | Expression |
---|---|---|
ADD | 00 | RA + RB |
SUB | 01 | RA - RB |
Bitwise AND | 10 | RA & RB |
Bitwise OR | 11 | RB |
Notes:
- Again, do not move any input or output pins in the template.
- A bitwise OR example: 0011 | 1000 = 1011
- A bitwise AND example: 0111 & 0101 = 0101