Name: Date:
HW1
(5 points) Write the 8-bit 2's complement form of -25. Show all your work.
(5 points) Write the hexadecimal form of 1337. Show all your work.
(10 points) Below is a truth table that implements 3vote. It has
inputs A, B, C and output R. Write the logical statement and draw the circuit diagram
that implements the truth table. You may only use multi-input AND, OR, and NOT
gates.
| A | B | C | R |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 0 | 0 | 1 | 0 |
| 0 | 1 | 0 | 0 |
| 0 | 1 | 1 | 1 |
| 1 | 0 | 0 | 0 |
| 1 | 0 | 1 | 1 |
| 1 | 1 | 0 | 1 |
| 1 | 1 | 1 | 1 |
(15 points) Write a module in Verilog or a function in C that implements 3vote. You
should choose types appropriate for the inputs/arguments and outputs/return values.