Professional Documents
Culture Documents
COMPUTER ORGANISATION
IT-IV SEM
(TIT-402)
110011 + (-111000)
convert 111000 in 2s complement form=-(000111+1)=-(001000)
110011
+ 001000
11101 1 =now it is in 2s form so convert it
(111011)2s=-(000100+1)=-(000101)=-5
b.
101110 - 11001100=00101110-11001100
(11001100)2s=-(00110011+1)=-(00110100)=-52
00101110 =46
46 - -52=46+52=98
Now
00101110 =46
00110100 =52
0110001 0 =98
c.
110011110011 - 111100001111
110011110011=-(001100001100+1)=-(001100001101)=-781
111100001111=-(000011110000+1)=-(000011110001)=-241
-781 - -241=-781 + 241=-540
110011110011
000011110001
110111100100 = -(001000011011+1)=-(001000011100)=-540
d.
11101000- 11000011
11000011=-(00111101)
11101000
00111101
00100101 =37
Q8. Is the following a valid alternative definition of overflow in twos
complementarithmetic?
If the exclusive-OR of the carry bits into and out of the leftmost column is 1,
then there is an overflow condition. Otherwise, there is not.
Ans:Yes,because on different bits ,xor gate gives result as 1 so if carry out and
carr in are different that it can be checked by their xoring .If result=0 then no
overflow otherwise there is overflow
Q9. Represent the following twos complement values in decimal:
1101011=-21
0101101=47
Q10. Represent the following decimal numbers in both binary sign/magnitude
and twos complement using 16 bits 1) +401 2) -14
1)401
sign/magnitude form=0000 0001 1001 0001
twos complement form=1111 1110 0110 1111
2)-14
sign/magnitude form=1000 0000 0000 1110
twos complement form=1111 1111 1111 0010
Q11.the unsigned (1011011)2 =( ? )10
a)63 b)91 c) 92 d)13
Q12.Which has the largest value?
A)(110)10 b) ( 10011011)2 c)(1111)2 d)(9A)16 e) (222)8
Q13.What is the weight of digit 3 in base 7 number 12345?
a)3 b)5 c)7 d)14 e)49
Q14.if (321)4=(57)10 What is the decimal equivalent of (32100000)4
a)57 x 105 b) 57 x 104 c) 57 x 45 d) 57 x 410
ans: (32100000)4 =(321)4 x 45
=57 x 45
Q15. The unsigned binary number (110001)2 is equal to ( ? )8
a)49 b)61 c)31 d)15 e)None of the above
Q16.In 6 bit 1s complement binary no system ,what is the decimal value
represented by
(010100)1s
a)-11 b)43 c)-43 d)20 e)-20
Q17.In 6 bit 2s complement binary no system ,what is the decimal value
represented by
(100100)2s
a)-4 b)36 c)-36 d)-27 e)-28
Q18.For 2s complement binary number,the range of values for 5 bit numbers is
a)0 to 31 b) -8
to +7 c)-8 to -8 d) -15 to -15 e) -16 to +15
Q19.For 4 bit 2s complement scheme,what is the result of this
(1011)2s + (1001)2s
1011 =-5
1001 = -7
1010 0 =4
a.0100 b. 0010 c. 1100 d.1001 e.overflow
010000000000
b)-6=-(110)=-(1.10) x 2^2
exp bits=2+127=129
1 10000001 1000000000
c)-1.5 =- (1.1)2 x 20
exp=0+127=127
1 01111111 100..0000
01111111 000000
h)-1.0 =
1 01111111
00000000.000000
i)(438F0000)16
convert in binary
(0100 0011 1000 1111 0000 0000 0000 0000)2
1.00 0011 1000 1111 0000 0000 0000 0000 x 2^30
Exp bits 30+127=157= (10011101)2
0
10011101
Q31. The following numbers use the IEEE 32-bit floating-point format.What is
the equivalent
decimal value?
a. 1 10000011 11000000000000000000000
b. 0 01111110 10100000000000000000000
c. 0 10000000 00000000000000000000000
ans: 1 10000011 11000000000000000000000
10000011=(131)10
Now subtract 127 from 131= 131-127=4
-(1. 11000000000000000000000 )2 x 2^4
-(11100.0000000000000000000)2 x 2^4 x 2-4
=-(11100.0000000000000000000) = (-28.0)10
b) 0 01111110 10100000000000000000000
01111110=126
Now 126-127=-1
=1.10100000000000000000000 x 2^-1
= 0.110100000000000000000000 x 2^-1 x 2 ^1
=0.110100000000000000000000=0.5+0.25+0.0625=0.8125
c) 0 10000000 00000000000000000000000
10000000=128
128-127=1
=1. 00000000000000000000000 x 2^1
=1.00000000000000000000000 x 2^1 x2^-1
=10.0000000000000000000000 = (2.0)10
(b) What is the largest values that can be represented using this format?
Express your answer as the nearest power of 10.
(GATE 2002)
ANS 35(A)
=1 01111000000000000000000
0100 0001
=1011 1100 0000 0000 0000 0000
0100 0001
=AC000081
B)LARGEST NO:
0 111111
1111110
We take exp bits as 1111110 =(126)10 , as 1111111 is generally not valid but if
you take 1111111 then also here answer will not differ much.(as here nothing is
given whether to take 1111 111 or not.But if question is explicitly about IEEE
754 then you cannot take 1111 110)
=1.111..11 x 16126-64 (1 is used for normalisation ,in (B) part nothing is
given about to do normalisation or not,so it is optional to do normalisation)
=
(1.111.11 )2 x 1662
=
(1.999)10 x 16 62
Converting 1662 in power of 10
We get 1662 = 1075 (nearly)
=>(1.999)10 x 1075
Q36. The following is a scheme for floating point number representation using
16 bits
(GATE2003)
Let s, e, and m be the numbers represented in binary in the sign, exponent, and
mantissa fields respectively. Then the floating point number represented is:
suppose the OS want to keep the information of no of total sectors in hard disk
.Now No of sectors cannot be a negative quantity .so a programmer can use a
unsigned variable to store this information.
General Questions
Q39. If a CPU has a clock frequency of 3.2 GHz, how long (in ns) does one
access cycle take?
Ans:
Time period=1/frequency=1/3.2GHz
=(1/3.2 x 109)
=0.3125 x 10-9seconds=0.3125 nanoseconds
Q40.Are hardware and software equivalent? Can you really do anything in
hardware that you can do in software, and vice-versa? Examples?
Ans:NO .
Q41.What are the three basic-level pieces of a digital computer?
Ans:
1- processor to interpret and execute programs
2- memory to store both data and programs
3- mechanism for transferring data to and from the outside world.
Q42.Give two reasons why you can't store 12GB of system memory on a hard
drive with an advertised capacity of 12GB.
Ans: Discussed in class
The operating system needs to store name and directory information on the disk,
information about sectors etc.These information are called meta data