Professional Documents
Culture Documents
Q1. An 8-bit register contains the binary value 10011100. What is the register value after 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. [ 4 marks]
Solution:
R = 10011100
Arithmetic shift right: 11001110
Arithmetic shift left: 00111000 overflow because a negative number changed to positive.
Q2. An integer 3,510,593 has hexadecimal representation 0x00359141, while the single-precision,
floating-point number 3510593.0 has hexadecimal representation 0x4A564504. Derive this
floating-point representation [ 6 marks]
Solution:
V = 3,510,593 = 0x 00359141
V = 0000,0000,0011,0101,1001,0001,0100,0001
= 1.10101100100010100000 ×2^(21)
= (-1)s × M × 2^E
s = 0; E =21=exp - Bias => exp = E+Bias = 21+127=148 = 128+16+4
exp = 1001,0100
M = 1+ frac×2^(-23) = 1.f22f21f1f0 = 1.10101100100010100000
Hence frac = 101,0110,0100,0101,0000,0100
Q3. Implement a circuit ( using D-flip flop and basic gates) that detects 3 or more consecutive 1's at
inputs. The state diagram has been provided for your reference. The state S3 is the state when 3
consecutive 1's have been obtained and the output then is a 1 represented by S3/1. For all other
states the output remains at 0 ( S0/0,S1/0,S2/0). [ 10 marks]
Solution :