Chapter_1_-_Number_Systems_db_edit
Chapter_1_-_Number_Systems_db_edit
Number Systems
Number System
• A system that is used for representing numbers is called the
number system.
• In Digital Electronics, the numbers are used to represent the
information.
• Hence, it is important to learn and understand different types
of number systems so we can easily represent and interpret
the information in the form of numbers.
• There are several types of number systems and the basis of
this classification is the base or radix of the number system.
• The base or radix of the number system is the total number of
symbols used to denoted the numbers in the number system.
• Solution
Number of Digits – 7, max power is 6.
Weight: 26 25 24 23 22 21 20
Binary Number: 1 1 0 1 1 0 1
1101101 = 26 + 25 + 23 + 22 + 20
= 64 + 32 + 8 + 4 + 1 = 109
• Solution
(19)10 = (1 0011)2
• Need 9 bits
(0.3125)10 = (0.0101)2
5/ 2 = 2 1
2/ 2 = 1 0
1/ 2 = 0 1
MSB
(0.3125)10 = (1010101.011)2
• Notice that the first three rules result in a single bit result (no
carry). In the fourth rule, the addition of two 1s yields a binary
two (10 – carry is generated).
(0.3125)10 = (0.40651….)8
1 5 5 likh sakte h
toh then we have to make pair of n of that
binary code and then evaluate that block of
binary chunk
(1101101)2 = (155)8
1 A E D
(1101011101101)2 = (1AED)16
Remainder
600 / 16 = 37 8 LSB (Least Significant Bit)
37 / 16 = 2 5 (600)10 = (258)16
2 / 16 = 0 2 MSB (Most Significant Bit)
means binary me base 2 hai toh khali do hi nymber se number bana sakte h ham
like 0 or 1
same in base 8 where the number is formed contains only 0-7
Remainder
323 / 5 = 64 3 LSB (Least Significant Bit)
64 / 5 = 12 4 (323)10 = (2243)5
12 / 5 = 2 2
2/ 5 = 0 2 MSB (Most Significant Bit)
Remainder
28 / 5 = 5 3 LSB (Least Significant Bit)
5/ 5 = 1 0 (1C)16 = (103)5
1/ 5 = 0 1
MSB (Most Significant Bit)
1235 = 1 × 25 + 2 × 5 + (3 × 1) = 𝑥𝑦 + 8
∴ 38 = 𝑥𝑦 + 8 ∴ 𝑥𝑦 = 30
∴ 4𝑥 = 8𝑦 ∴ 𝑥 = 2𝑦
• To have the numbers satisfy the equation, 4 < x(base) and y < 8
(base)
∴ 𝑥 = 6, 𝑦 = 3 ∴ 𝑥 = 14, 𝑦 = 7
∴ 𝑥 = 8, 𝑦 = 4
∴ 𝑥 = 10, 𝑦 = 5
∴ 𝑥 = 12, 𝑦 = 6
• Converting +3
2𝑛 − 1 𝑃 𝐾
𝟏𝟓 +3 −3
−3 = 1111 − 0011 = 1100
1’s compliment
• Example for 𝑛 = 4 𝐾 = 24 − 𝑃
= 1610 − 𝑃 = 10000 2 −𝑃
• Converting +3 to -3
2𝑛 𝑃 𝐾
𝟏6 +3 −3
−3 = 10000 − 0011 = 1101
𝐾 = 1010
0 0 0 0 100
0 0 0 0 01 1 1 (7)10
+0 0 0 0 0 1 0 0 + (4)10
00 00 1 0 1 1 + (11)10
1 11 1 1 1 0
0 0 0 0 1 1 1 1 (15)10
+1 1 1 1 1 0 1 0 + (−6)10
1 0 0 00 1 0 0 1 + (9)10
0 00 0 0 0 0
0 0 0 1 0 0 0 0 (16)10
+1 1 1 0 1 0 0 0 + (−24)10
0 1 1 11 1 0 0 0 + (−8)10
1 11 1 1 1 1
1 1 1 1 1 0 1 1 (−5)10
+1 1 1 1 0 1 1 1 + (−9)10
1 1 1 11 0 0 1 0 + (−14)10
0 0 0 0 0 0
(8)10 1 0 0 0 1 0 0 0 (8)10
+ (4)10 +0 1 0 0 +1 0 0 1 + (9)10
+ (12)10 1 1 0 0 Invalid BCD 1 0 0 0 1 + (17)10
+0 1 1 0 +0 1 1 0
10 0 0 0 0
1 0 0 10 1 0 1 1 1
+0 0 0 0 0 1 1 0 0 1 1 0
0 0 01 1 1 1 1 11 0
0 1 11 0 1 1 0 0 0 0 0 Valid BCD
9s complement of 240
1 0
9 9 9 3 7 5
− 2 4 0 + 7 6 0
+ 7 5 9 1 1 3 5
+ 1 Ignore the carry generated,
+ 7 6 0 result if 135.
10s complement of 240
Solution
1 0 1 0 1 0 1 1 1 0 1 1
A B Y
Self-study gray to binary.
0 0 0
0 1 1
1 0 1
1 1 0
• IMP=> The nibble that has produced a carry, add 0011 with it
and subtract 0011 from the nibble that has not.
0 00 1 0 0 0 1 0 0 0
(356)10 0 1 1 0 1 0 0 0 1 0 0 1
+ (579)10 +1 0 0 0 1 0 1 0 1 1 0 0
+ (935)10 0 1 1 1 1 0 0 1 1 0 1 0 1 Invalid XS-3
−/+ 0 0 1 1 0 0 1 1 0 0 1 1
0 0 00 0 1 1 0 11 1
1 1 00 0 1 1 0 1 0 0 0 Valid XS-3
Overflow
Overflow
• For the 2s complement method, we discard the carry. It would
make the result positive, which will be an incorrect result.