Description
Combinational Logic and ALU
Converting between Octal and Decimal Numbers
| 1. Convert 13378 to decimal (base 10)
Use sum of expansion of products (don’t skip steps!) |
|
| 2. Convert 7110 to octal (base 8)
Use the Double-Dabble method of successive divsion |
|
| 3. What file permissions does the octal number 5 exhibit? | 4. What file permissions does the octal number 3 exhibit? |
Converting between Hexadecimal and Decimal Numbers
| 5. Convert AC34D116 to decimal (base 10)
Use sum of expansion of products (don’t skip steps!) |
| 6. Convert 36510 to hexadecimal (base 16)
Use the Double-Dabble method of successive divsion |
Adding Signed Binary Numbers (with Two’s Complement)
| 7. Add -8 + 5 in 4-digit binary.
First convert to Two’s Complement binary, then compute the sum.
|
Half Adder (Two Inputs) Design
| 8. Write the Boolean function for the outputs (sum and carry). Use K-maps if needed. Then write the HDL code. | |
| sum(a, b) =
carry(a, b) = |
|
| CHIP HalfAdder {
IN a, b; OUT sum, carry;
PARTS:
} |
|
Full Adder (Three Input) Design
| 9. Write the Boolean function for the outputs (sum and carry). Use K-maps if needed. Then write the HDL code. | |
|
sum(a, b, c) =
carry(a, b, c) = |
|
| CHIP FullAdder {
IN a, b, c; OUT sum, carry;
PARTS:
} |
|
Implementing the ALU Design (with signed two’s complement numbers)
| f(x,y) = | 0 | “1010” -6 | “0001” 1 | f(x,y) = | 1 | “1010” | “0001” | |
| zx = | 1 | “0000” | zx = | |||||
| nx = | 0 | “0000” | nx = | |||||
| zy = | 1 | “0000” | zy = | |||||
| ny = | 0 | “0000” | ny = | |||||
| f = | 1 | “0000” | f = | |||||
| no = | 0 | “0000” [0] | no = | |||||
| f(x,y) = | -1 | “1010” | “0001” | f(x,y) = | x | “0100” | “0101” | |
| zx = | zx = | |||||||
| nx = | nx = | |||||||
| zy = | zy = | |||||||
| ny = | ny = | |||||||
| f = | f = | |||||||
| no = | no = | |||||||
| f(x,y) = | y | “1010” | “0011” | f(x,y) = | !x | “1010” | “0101” | |
| zx = | zx = | |||||||
| nx = | nx = | |||||||
| zy = | zy = | |||||||
| ny = | ny = | |||||||
| f = | f = | |||||||
| no = | no = | |||||||
| f(x,y) = | !y | “1010” | “0101” | f(x,y) = | “-x” | “0010” | “1000” | |
| zx = | zx = | |||||||
| nx = | nx = | |||||||
| zy = | zy = | |||||||
| ny = | ny = | |||||||
| f = | f = | |||||||
| no = | no = | |||||||
| f(x,y) = | “-y” | “1010” | “0001” | f(x,y) = | x+1 | “0001” | “0001” | |
| zx = | zx = | |||||||
| nx = | nx = | |||||||
| zy = | zy = | |||||||
| ny = | ny = | |||||||
| f = | f = | |||||||
| no = | no = | |||||||
| f(x,y) = | y+1 | “1010” | “1111” | f(x,y) = | x-1 | “0110” | “0001” | |
| zx = | zx = | |||||||
| nx = | nx = | |||||||
| zy = | zy = | |||||||
| ny = | ny = | |||||||
| f = | f = | |||||||
| no = | no = | |||||||
| f(x,y) = | y-1 | “0001” | “1111” | f(x,y) = | x+y | “0010” | “0101” | |
| zx = | zx = | |||||||
| nx = | nx = | |||||||
| zy = | zy = | |||||||
| ny = | ny = | |||||||
| f = | f = | |||||||
| no = | no = |
| f(x,y) = | x-y | “0111” | “0010” | f(x,y) = | y-x | “1101” | “1111” | |
| zx = | zx = | |||||||
| nx = | nx = | |||||||
| zy = | zy = | |||||||
| ny = | ny = | |||||||
| f = | f = | |||||||
| no = | no = | |||||||
| f(x,y) = | x&y | “1011” | “1000” | f(x,y) = | x|y | “1111” | “1010” | |
| zx = | zx = | |||||||
| nx = | nx = | |||||||
| zy = | zy = | |||||||
| ny = | ny = | |||||||
| f = | f = | |||||||
| no = | no = |






