Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Education وزارة التعليم
Taif University جـــامعــة الطـائف
College of Computers & Information Technology كلية الحاسبات وتقنية المعلومات
Computer Architecture 503323-3 معمارية الحاسب
Assignment 2
[1] Design an arithmetic circuit with one selection variable S and two n-bit data inputs A
and B. The circuit generates the following four arithmetic operations in conjunction
with the input carry Cin. Draw the logic diagram for the first two stages.
S Cin = 0 Cin = 1
0 D = A + B (add) D = A + 1 (increment)
1 D = A – 1 (decrement) D=A+ B̅ +1 (subtract)
Assignment 2 1
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Education وزارة التعليم
Taif University جـــامعــة الطـائف
College of Computers & Information Technology كلية الحاسبات وتقنية المعلومات
Computer Architecture 503323-3 معمارية الحاسب
[2] Draw the adder-subtractor circuit for input mode M and data inputs A and B. In each
case, determine the values of the outputs: S3, S2, S1, S0, and C4.
M A B
a- 0 0111 0110
b- 0 1000 1001
c- 0 1100 1000
d- 1 0101 1010
e- 1 0000 0001
Assignment 2 2
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Education وزارة التعليم
Taif University جـــامعــة الطـائف
College of Computers & Information Technology كلية الحاسبات وتقنية المعلومات
Computer Architecture 503323-3 معمارية الحاسب
[3] Design an arithmetic circuit with two selection variables S 0, S1 and two 4-bits data
inputs (A and B), which fulfills the following function table:
S1 S0 Cin Operation
0 0 ? Transfer A
0 1 ? Decrement A
1 0 ? ADD (A+B)
1 1 ? Subtract (A-B)
Show the values of the carry input (Cin) for every specified operation
Assignment 2 3
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Education وزارة التعليم
Taif University جـــامعــة الطـائف
College of Computers & Information Technology كلية الحاسبات وتقنية المعلومات
Computer Architecture 503323-3 معمارية الحاسب
[4] Design a digital circuit that performs the four logic operations of exclusive-OR,
exclusive-NOR, NOR, and NAND. Use two selection variables. Show the logic
diagram of one typical stage.
Assignment 2 4
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Education وزارة التعليم
Taif University جـــامعــة الطـائف
College of Computers & Information Technology كلية الحاسبات وتقنية المعلومات
Computer Architecture 503323-3 معمارية الحاسب
[5] Register A holds the 8-bit binary 11011001. Determine the B operand and the logic
micro operation to be performed in order to change the value in A to:
01101101
11111101
Assignment 2 5
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Education وزارة التعليم
Taif University جـــامعــة الطـائف
College of Computers & Information Technology كلية الحاسبات وتقنية المعلومات
Computer Architecture 503323-3 معمارية الحاسب
[6] The 8-bit registers AR, BR, CR, and DR initially have the following values:
AR = 11110010
BR = 11111111
CR = 10111001
DR = 11101010
Determine the 8-bit values in each register after the execution of the following
sequence of microoperations.
AR AR + BR
CR CR DR, BR BR + 1
AR AR - CR
Assignment 2 6
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Education وزارة التعليم
Taif University جـــامعــة الطـائف
College of Computers & Information Technology كلية الحاسبات وتقنية المعلومات
Computer Architecture 503323-3 معمارية الحاسب
[7] An 8-bit register contains the binary value 10011100. What is the register value after
an arithmetic shift right? Starting from the initial number 10011100, determine the
register value after an arithmetic shift left, and state whether there is an overflow.
Assignment 2 7
Kingdom of Saudi Arabia المملكة العربية السعودية
Ministry of Education وزارة التعليم
Taif University جـــامعــة الطـائف
College of Computers & Information Technology كلية الحاسبات وتقنية المعلومات
Computer Architecture 503323-3 معمارية الحاسب
[8] Starting from an initial value of R = 11011101, determine the sequence of binary values
in R after a logical shift-left, followed by a circular shift-right, followed by a logical
shift-right and a circular shift-left.
Assignment 2 8