Professional Documents
Culture Documents
Number Conversion, Addition and Subtraction Practice Problems
Number Conversion, Addition and Subtraction Practice Problems
1 1 0 01
-1x2 = 1
-1x2' = 2
-0x2'= o
-0x2 = 0
-1x2 = 16
-1x2 = 32
Ans 51
Problem 4
Convert decimal 0.75 to
Problem 5 Convert decimal 0.31
to binary (to 6 places of decimal).
binary.
Solution Solution:
0 0.62
O.50 2
x2
0.24
00
Ans : 0.1l
2 X
0.48
2
0 0.96
0.92
2 x
0.84
Ans:0.010011
ii) Fraction
Solution: i) Whole Number
Integer Fractlon
0.45
65
2 x
2L 32 0 0.90
16
2 X
0.80
8 0 2 X
0 1 0.60
2 X
0.20
0 2
0 0.40
0
2
0 - 0.80
2 X
Ans: 1000001.0111001
0.60
23 0 2 8 2 13 0
4 0
26
21 2 2 0
23 0
the following
on:
Octal to Decimal converslon: X 327.
Problem 8
Problem Perform
(Annual 1988, B.U)
X.
Here we have to find the value of
Solution :
8 8
64 8
3
7x1 = 7
2x8 16
3 x64 192
Answer :X = 215
8 8
8 8 8
64 8
512 64 8
5 6 6
7x1 = 3
7 3x1
6x8 48 7x8 56
384
5x 64= 320 6x 64 =
64
0 3.
5x
4x
1x3 = 3
8x0 0
Ix64 = 64
67.37 or 67.57810
64
Problem 11 Perform the following: (204.2)= 1 0 = ?
(Aug/Sep 99, V.T.U.)
64 8 1
2 0 4 2
2x 0.25
4x1 4
0x8 0
2 x64 = 128
132 25 or 132.2510
7.7 Conversion of Decimal Numbers to Octal Numbers
Instead of dividing by 2 as in the case of binary numbers, we divide by 8
Cthe base of octal numbers), writing down the remainders with each division.
The remainders, when read down to up give the desired octal number.
Problem 12 Perform the following Octal to Decimal conversion:
(1)654, X, (2) X 89010 (Annual 1988, B.U.)
Solution of (1) : Solution of (2)
8 654 8 890
3 81 6 8 111-2
8 10- 1 8 13 7
8 2 - 5
0- 0 1
1216 Ans:X = 1572
Ans: X =
270 Basic ElectronicsS
3 places).
in decimal to octal (upto
Convert 0.23
Problem 13
Solution Integer Fractlon
0.23
8 X
0.84
8 X
0.72
8X
5 0.76
Ans:0.165
Answer: 17333.66, 3 6 6
7.9 Hexadecimal Number
of
We have seen that
a System
computer uses
perform arithmetic operations. binary numbers rather thanan decimal numbers
can be made to This is
should be aware correspond
that it is not
to the because deciiuaand
on-off state of the two binary number
and 0
we
position to represent feasible for the computer circuits. How ever,
two storage positions, one for 2 and one for 3, its binary
Decimal| Hexadecimal
equivalent 10111 would utilize five storage positions.
0 0
Thus, to have the computer store a single binary digit in'
one storage position means that inefficient use is made 2 2
of a large storage capability.
We have earlier seen that the computer can group
together three binary digits to produce a single digit in
the octal system. Here we will see that four binary digits
can similarly be grouped together to produce a single
digit in the base 16 or Hexadecimal Number System. 8
computers that represent data in base 16, each storage 9 9
position can store two hexadecimal digits with each such 10 A
digit corresponding to four binary digits. 11 B
In base 10, there are ten unique digits 0 to 9; in base 2 12 C
there are two unique digits 0 and 1; in base 8 there are 13 D
eight unique digits 0 to 7; in base 16 there are sixteen 14 E
unique digits. They are represented as shown. 15 F
16 16
16 1
A F
(10) (15)
15x1 15
10x 16 = 160
Answer = 175
272 Basic Electronics
to equlvalent
decimal.
Problem 19 Convert B6A in hexadecimal
256 16 1
B 6 A
(11) (10)
10x 1 10
6x 16 96
-11 x 256 = 2816
Answer = 2922
16 16 16 16
256 16 1/16
3 A 4
A B C
(10) (11) (12)
-1212x 16= 12
-11x 16'= 176
10x 16 = 2560
Ans 2748
16 246 Remainder
16 15 156
0 15 (F)
Answer: F6
Digital Electronics 273
6) Fractions: The conversion method is similar to the other two number systems
except that multiplication is done by 16.
Problem 23 Problem 24
Convert 0.75 to hexadecimal Convert 0.31 to hexadecimal
15(F)- 0.36
Answer = 0.4F
Problem 25
i) Convert Decimal 342.56 to Hexadecimal.
(a) (b)
16 342 Remainder Integer Fraction
16 2 1 6 0.56
16 16 0.8 F16
0 0.96
16
15(F) 0.36
Ans: 156.8F16
6x16 6x1 =
6
Dx 16 = 13x 16 208
8x 16= 8x 256 = 2048
In order to convert to Octal form two zeros have to be added on the LHS to
complete a 3-bit group. Thus we have
276 Basic Electronics
16 532 0.65
16 33 16x 00ftfor
162 10(A)- 0.40
16 x
6 0.40
Answer: (214.A6)6
o3 d
Now, convert this into decimal
we
as follows lomiosboxoH
Hexadecimal 2 A 6 Csald
Binary 0010 0001 0100 (Ans) s
1010 0110
i) (ABCD)16 yobersH
Hexadecimal A B
Binary 1010 1011
C
1100
D aend wor
1101
Octal 001
(Ans)
010 101 111 001
Octal 101
1 2 5 7 1 5
7.13 Binary Addition
or
(125715), (Ans)
Computer circuits do not possess
Before decimal numbers; they
understanding
add binary numbers. how a
computer performs arithmetic possess binary num bers.
and division. Binary addition is the key to we have to
learn notion
There are 4 basic binary subtraction, mulupi
cases of
binary addition
Digital Electronics 277
1) 0 0 = 0
2) 01 =1 CoA
3) 1 0 = 1
4) 1+1 = 10 (zero, with a carry of 1)
Problem 37 Convert decimal numbers 13 and 10 into blnary, add them, and
reconvert into decimal.
Solution: Decimal Binary
13 1101
10 1010
23 10111
Inunit's position: 1 0 1
In 2's position 01 = 1
In 4's position 1 0 1
In8's position 11 =
=10
Problem 38 Convert 3.25, and 5.75, into binary, carry out the binary addition
and reconvert the result into decimal.
Solution 310112 0.25,0.01, 3.25111.01,
5101012: 0.75,0 = 0.112 5.75,101.11,
FED CBA
1 1.01
1 0 111
1 0 0 1. 0 0
The sequence of operations, columnwise is described below:
In Column :1+1 = 0 with a carry of 1
2) Proceed as in addition.
3) Cross offthe high order
or leftmost digit (a 1 when the number is positive)
and add a l to the total (end-around-carry).
Problem 41 1101,- 1000, = (?),
Binary Decimal
1 1 0 1 Minuend
- 1 000 Subtrahend
Problem 42 11101,
-
11000, =
(?),
Binary Decimal1
1 11101 Minuend 29
- 1 10 0 0 Subtrahend 2 4
? 5
1110 1 Minuend
+0 0 1 11 Complemented subtrahend
XO 0 1 00
1 00 0 Minuend 24
-11101 Subtrahend 29
-5
Repeat the Minuend 110 0 0
Complement of Subtrahend:0 0 010+
Result 11 0 1 0
Complement Result
and place negative sign : -0 0 10 1
Ans :-101, or
-510
Problem 44 1101- 11001
Binary Decimal
1 1 01 Minuend 13
- 110 01: Subtrahend 25
? - 12
Minuend 0 1 1 01
Complement of Subtrahend 0 0 1 1 0 + IoE
Result 10 0 1 1
Complement Result and put -ve sign - 0 1 1 0 0 = - 1100 (Ans.)
-1210
Problem 45 Use the 1's complement to perform the following subtractions
(1) 1111 - 1011 (2) 110011 - 100101
(Annual 1987, B.U.)
Solution: 1) Binary Decimal
Minuend 1 1 1 15
Subtrahend -1 0 1 1 -11
? 4
Minuend 1111
Complement Subtrahend 0 1 0 0 +
Result of Addition 1 1 1
End-around-Carry
010 0
Ans: 100, =
410
2) Binary Decimal
Minuend 51
Subtrahend - 1 0 0 101 - 37
? 14
Digital Electronics 281
Minuend 1 1 00 1 1
Complement Subtrahend 01 1 0 1 0 +
Result of Addition
1 DO 110 1
End-around-Carry
Ans: 1110, = 141o
Problem
Solutionn
46 Subtract (10001), from (10011), using 1's complement arithmetic.
l's complement of Subtrahend:01 1 10
Minuend 10 0 11 +
(carry) K O 0 0 01
O00T0
Ans:(10),
Problem 47 Perform the subtraction (A - B) using l's complement,
where A = 1011 1001 and B = 0000 1011.
Solution:
Number 'A' (Minuend) 10 1 1 10 0 1 +
l's Complement of 'B' (Subtrahend) 1111 10100
(carry K1 0 10 1 1 0 1
+
Result 101 0 1 1 1 0
(A B) = 1010 1110
Problem 48 1011 -
0 010
Ans: 10,
Binary Decimal1
110 Minuend 13
-1 1 0 Subtrahend -10
3
l's Complement of Subtrahend = 0 1 0 1
1+
2's complement 01 1 0
Add this result to the Minuend
1 10 1 Aolavidu s mobo
+0 1 1 0 notho?
*O 0 11
Disregard carry Answer: 0011, =
11, =
310 emio
Problem 50 Use 2's complement to perform the following binary subtractions
1) 1111 1011 (2) 110011 100101 (Annual 1987, B.U.)
1) Decimal
1
1 1 1 Minuend 15
- 1011 Subtrahend - 11
?
dud lo Jnomoioo
l's Complement of Subtrahend 0 1 0 0
2'scomplement 0 1 01
Minuend:1111
2's Comp. of Sub: 0 10 S pniaunoltoetidu
1
O1 0 0
Disregard carry- Ans: 100,
2) Decimal1
1 0 0 1 1 51
o
-
1 0 0 1 0 1
-37
14
Digital Electronics 283
2 125 2 68
2 62 2 34
2 31 0 2 17 0
15 2
2 2 0
2 2
2 83
16 0 2 41
20
2
2 10 0
0
2
1
16,10000, 83 1010011,
Decimal Binary
+16 +100 0 0 Minuend ollulo
- 83 - 10 1 0 0 1 1 Subtrahend
's Complement of subtrahend 0 1 0 1 1 00
1+
2's Complement of Subtrahend 0 101 101
Add Minuend 10 0 0 0 +
Intermediate Result 0 111 101
2's Complement of the above Intermediate Result, along with negative sign, gives
the Answer, as shown below :
's Complement of Intermediate Result 100 0 0 1 0
1+
2's Complement 1000 0 1 1
Ans -1000011, = -67j0
Binary Decimal
1111 Minuend 15
1 101 Subtrahend -13 ue lo toomslqoS
2
l's complement of Subtrahend 0 010
1+
2's Complement 0 0 1 1
Again, Minuend 1111
2's Complement of Subtrahend
0 011 + btha slt aoho1 1d
0 0 10 s
Disregard Carry
Ans: 10, (Decimal:2)
Digital Electronics 285
i) 10111 - 10011
Binary Decimal
10 1 1 1 Minuend 23
0 0 1 1 Subtrahend -19
l's Complement of Subtrahend 01 100
2's Complement 0 1 11
Again Minuend 1 101
2's Complement of Subtrahend 0111
O1 0 0
Disregard Carry-
gAns: 100, (Decimal: 4)
Problem 53 Subtract (10111), from (10101),, using 2's complement arithmetic.
Binary Decimal1
10 1 0 1 Minuend 21
- 101L Subtrahend -23 t o
?
l's Complement of Subtrahend : 0 1 0 0 0
1+
010 0 1
2's Complement
Minuend 10101
2's complement of Subtrahend 0 1001 +
Intermediate Result 11110
l's complement ofIntermediate Result: 0 0 0001
1
2's complement 00010
Ans:- 10, (decimal -2)
286 Basic Electronics
Problem 54
Subtract 11001 from 10110 using 2's complement arithmetic.
(MQP-4, VTU)
Solution:
Binary Decimal1
Minuend 0 1 10 22
Subtrahend 11001 - 25-3
l's complement of subtrahend 0 0 1 10
1
2's complement of subtrahend 00 1 1 1
1 0 1 10
Add Minuend +
1+
2's complement of subtrahend 00 1 0 1
Minuend 11 101
2's complement of subtrahend 0 0 1
010 1+
O0 0 10
Disregard Carry
Ans: 102