Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
29 views

Lecture 2

This document contains a lecture on number systems and conversions between decimal, binary, octal and hexadecimal number systems. It includes examples of converting numbers between different bases as well as practice questions for students to test their understanding. The lecture explains the step-by-step process to convert numbers between different bases and provides the answers and explanations for sample practice questions.

Uploaded by

Abhishek
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views

Lecture 2

This document contains a lecture on number systems and conversions between decimal, binary, octal and hexadecimal number systems. It includes examples of converting numbers between different bases as well as practice questions for students to test their understanding. The lecture explains the step-by-step process to convert numbers between different bases and provides the answers and explanations for sample practice questions.

Uploaded by

Abhishek
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Lecture 2

Dr. Krishan Arora


Asstt. Prof. and Head
Practice Question
If (41) r  (7)10 find value of r
H int s : ConvertLHS and RHS in same format
Square on both side
(41) r  (49)10
4r  1  49
r  48
4
r  12
Example
If (224)r  (13) r find value of r

(224) r  169r
2r  2r  4  r  6r  9
2 2

r  4r  5  0
2

r  5, 1
r 5
Practice Question
• The representation of octal number (532.2)8
in decimal is ________

a) (346.25)10
b) (532.864)10
c) (340.67)10
d) (531.668)10
Explanation
• Answer: a
Explanation: Octal to Decimal conversion is
obtained by multiplying 8 to the power of
base index along with the value at that index
position.
(532.2)8 = 5 * 82 + 3 * 81 + 2 * 80 + 2 * 8-1 =
(346.25)10
Practice Question
• The decimal equivalent of the binary number
(1011.011)2 is ________

a) (11.375)10
b) (10.123)10
c) (11.175)10
d) (9.23)10
Explanation
• Answer: a
Explanation: Binary to Decimal conversion is
obtained by multiplying 2 to the power of
base index along with the value at that index
position.
1 * 23 + 0 * 22 + 1 * 21 +1*20 + 0 * 2-1 +1 * 2-2 +
1 * 2-3 = (11.375)10
Hence, (1011.011)2 = (11.375)10
Practice Question
• The decimal equivalent of the octal number
(645)8 is ______

a) (450)10
b) (451)10
c) (421)10
d) (501)10
Explanation
• Answer: c
Explanation: Octal to Decimal conversion is
obtained by multiplying 8 to the power of
base index along with the value at that index
position.
The decimal equivalent of the octal number
(645)8 is 6 * 82 + 4 * 81 + 5 * 80 = 6 * 64 + 4 * 8
+ 5 = 384 + 32 + 5 = (421)10.
Practice Question
• Representation of hexadecimal number
(6DE)H in decimal:

a) 6 * 162 + 13 * 161 + 14 * 160


b) 6 * 162 + 12 * 161 + 13 * 160
c) 6 * 162 + 11 * 161 + 14 * 160
d) 6 * 162 + 14 * 161 + 15 * 160
Explanation
• Answer: a
Explanation: Hexadecimal to Decimal
conversion is obtained by multiplying 16 to
the power of base index along with the value
at that index position.
In hexadecimal number D & E represents 13 &
14 respectively.
So, 6DE = 6 * 162 + 13 * 161 + 14 * 160.
Practice Question
• The given hexadecimal number (1E.53)16 is
equivalent to ____________

a) (35.684)8
b) (36.246)8
c) (34.340)8
d) (35.599)8
Explanation
• Answer: b
Explanation: First, the hexadecimal number is
converted to it’s equivalent binary form, by writing the
binary equivalent of each digit in form of 4 bits. Then,
the binary equivalent bits are grouped in terms of 3
bits and then for each of the 3-bits, the respective digit
is written. Thus, the octal equivalent is obtained.
(1E.53)16 = (0001 1110.0101 0011)2
= (00011110.01010011)2
= (011110.010100110)2
= (011 110.010 100 110)2
= (36.246)8.
Practice Question
• The octal number (651.124)8 is equivalent to
______

a) (1A9.2A)16
b) (1B0.10)16
c) (1A8.A3)16
d) (1B0.B0)16
Explanation
• Answer: a
Explanation: First, the octal number is converted
to it’s equivalent binary form, by writing the
binary equivalent of each digit in form of 3 bits.
Then, the binary equivalent bits are grouped in
terms of 4 bits and then for each of the 4-bits,
the respective digit is written. Thus, the
hexadecimal equivalent is obtained.
(651.124)8 = (110 101 001.001 010 100)2
= (110101001.001010100)2
= (0001 1010 1001.0010 1010)2
= (1A9.2A)16.
Practice Question
• The octal equivalent of the decimal number
(417)10 is _____

a) (641)8
b) (619)8
c) (640)8
d) (598)8
Explanation
• Answer: a
Explanation: Octal equivalent of decimal
number is obtained by dividing the number by
8 and collecting the remainders in reverse
order.
8 | 417
8 | 52 — 1
8|6–4
So, (417)10 = (641)8.
Practice Question
• Convert the hexadecimal number (1E2)16 to
decimal.

a) 480
b) 483
c) 482
d) 484
Explanation
• Answer: c
Explanation: Hexadecimal to Decimal
conversion is obtained by multiplying 16 to
the power of base index along with the value
at that index position.
(1E2)16 = 1 * 162 + 14 * 161 + 2 * 160 (Since, E
= 14)
= 256 + 224 + 2 = (482)10.
Practice Question
• (170)10 is equivalent to ____________

a) (FD)16
b) (DF)16
c) (AA)16
d) (AF)16
Explanation
• Answer: c
Explanation: Hexadecimal equivalent of
decimal number is obtained by dividing the
number by 16 and collecting the remainders
in reverse order.
16 | 170
16 | 10 – 10
Hence, (170)10 = (AA)16.
Practice Question
• Convert (0.345)10 into an octal number.

a) (0.16050)8
b) (0.26050)8
c) (0.19450)8
d) (0.24040)8
Explanation
• Answer: b
Explanation: Converting decimal fraction into
octal number is achieved by multiplying the
fraction part by 8 everytime and collecting the
integer part of the result, unless the result is 1.
0.345*8 = 2.76 2
0.760*8 = 6.08 6
00.08*8 = 0.64 0
0.640*8 = 5.12 5
0.120*8 = 0.96 0
So, (0.345)10 = (0.26050)8.
Practice Question
• Convert the binary number (01011.1011)2
into decimal.

a) (11.6875)10
b) (11.5874)10
c) (10.9876)10
d) (10.7893)10
Explanation
• Answer: a
Explanation: Binary to Decimal conversion is
obtained by multiplying 2 to the power of
base index along with the value at that index
position.
(01011)2 = 0 * 24 + 1 * 23 + 0 * 22 + 1 * 21 + 1 *
20 = 11
(1011)2 = 1 * 2-1 + 0 * 2-2 + 1 * 2-3 + 1 * 2-4 =
0.6875
So, (01011.1011)2 = (11.6875)10.

You might also like