Homeworks , and labs for sysc 3006 fall 2016 PDF

Title Homeworks , and labs for sysc 3006 fall 2016
Course Computer Organization
Institution Carleton University
Pages 1
File Size 38 KB
File Type PDF
Total Downloads 73
Total Views 129

Summary

sysc 3006 term homework and labs documents from fall 2016-2018, includes non-mandatory homeworks but mandatory labs...


Description

Carleton University Dept. of Systems and Computer Engineering Computer Organization—SYSC 3006

Homework #2 Dr. Ramy Gohary

1. Consider a 32-bit binary number 0b11101101001011100000000101011010. Do the following. • Express this number in the hexadecimal form. • Take the 2’s complement of this number. • Express the 2’s complement in the hexadecimal form. • Add the 2’s complement you obtained to the original binary number. 2. The following decimal X and Y values are to be added using 4-bit registers. Determine the Carry and oVerflow values, i.e., the C and V flags. Hint: use the 2’s complement to represent the negative values. • X = 2, Y = 3 • X = 2, Y = 7 • X = 4, Y = −5 • X = −5, Y = −7 • X = 2, Y = −1 3. Given the 4-bit binary adder, the 4-bit binary subtracter and the 5-bit multiplexer (MUX) shown in Figure 1, design an ALU that generates A − B if the operation input is 0 and A + B if the operation input is 1. Hint: don’t forget to connect the Carry and Borrow bits. 4. Extend the ALU in the previous problem to include the bitwise AND and OR operations. Use an appropriate MUX to do that. 5. How will the MUX change if the adder and the subtracter are 8-bits each? Y

X

4

X 4

Y 4

4 5

SUBTRACTER

ADDER X+Y

5

X−Y

MUX 5

Carry

4

Borrow

4 Operation

Figure 1: Components of a basic ALU 1...


Similar Free PDFs