Chapter 1 Number Systems and Codes. Number Systems (1). Positional Notation N = ( a n-1 a n-2 ... a 1 a 0 . a -1 a -2 ... a -m ) r (1.1) where . = radix point r = radix or base n = number of integer digits to the left of the radix point
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Chapter 1
N = (an-1an-2 ... a1a0 . a-1a-2 ... a-m)r(1.1)
where . = radix point
r = radix or base
n = number of integer digits to the left of the radix point
m = number of fractional digits to the right of the radix point
an-1 = most significant digit (MSD)
a-m= least significant digit (LSD)
N = an-1x rn-1 + an-2x rn-2 + ... + a0x r0 + a-1 x r-1... + a-m x r-m
= (1.2)
Chapter 1
= (26.75)10
1G (giga) = 230 = 1,073,741,824
Chapter 1
Chapter 1
111011 Carries
101011 Augend
+ 11001 Addend
1000100
0 1 10 0 10 Borrows
1 0 0 1 0 1 Minuend
- 1 1 0 1 1 Subtrahend
1 0 1 0
Chapter 1
1 1 0 1 0 Multiplicand
x 1 0 1 0 Multiplier
0 0 0 0 0
1 1 0 1 0
0 0 0 0 0
1 1 0 1 0
1 0 0 0 0 0 1 0 0 Product
Chapter 1
1 1 1 Carries
5 4 7 1Augend
+ 3 7 5 4 Addend
11445 Sum
6 10 4 10Borrows
7 4 5 1 Minuend
- 5 6 4 3 Subtrahend
1 6 0 6 Difference
Chapter 1
326 Multiplicand
x 67 Multiplier
2732 Partial products
2404
26772 Product
Chapter 1
1 0 1 1 Carries
5 B A 9 Augend
+ D 0 5 8 Addend
1 2 C 0 1 Sum
9 10 A 10 Borrows
A 5 B 9 Minuend
+ 5 8 0 D Subtrahend
4 D A C Difference
N = an-1rn-1 + … + a0r0 + a-1r-1 + … + a-mr-m(1.3)
Chapter 1
B9A5 Multiplicand
x D50 Multiplier
3A0390 Partial products
96D61
9A76490 Product
Chapter 1
N = an-1rn-1 + … + a0r0 + a-1r-1 + … + a-mr-m(1.3)
N = 1´24 + 1´23 + 0´22 + 1´21 + 0´20
= (16)10 + (8)10 + 0 + (2)10 + 0
= (26)10
N = 6´82 + 2´81 + 7´80
= (384)10 + (16)10 + (7)10
= (407)10
Chapter 1
Here, bi’s represents the digits of (NI)Bin base A.
= (Quotient Q1: bn-1Bn-2 + … + b1B0 ) + (Remainder R0: b0)
1. Divide (NI)Bby (B)A, producing Q1 and R0. R0is the least significant digit, d0, of the result.
2. Compute di, for i = 1 … n - 1, by dividing Qi by (B)A, producing Qi+1 and Ri, which represents di.
3. Stop when Qi+1 = 0.
Chapter 1
Chapter 1
Here, (NF)Ais a fraction in base A and bi’s are the digits of (NF)Bin base A.
= (Integer I-1:b-1) + (Fraction F-2: b-2B-1 + … + b-mB-(m-1))
1. Let F-1 = (NF)A.
2. Compute digits (b-i)A, for i = 1 … m, by multiplying Fi by (B)A,
producing integer I-i, which represents (b-i)A, and fraction F-(i+1).
3. Convert each digits (b-i)A to base B.
Chapter 1
MSD 3.832 ¬ 0.479 ´ 8
6.656 ¬ 0.832 ´ 8
5.248 ¬ 0.656 ´ 8
LSD 1.984 ¬ 0.248 ´ 8
…
MSD 0.9580 ¬ 0.479 ´ 2
1.9160 ¬ 0.9580 ´ 2
1.8320 ¬ 0.9160 ´ 2
LSD 1.6640 ¬ 0.8320 ´ 2
…
Chapter 1
To convert a number N from base A to base B, use
(a) the series substitution method with base B arithmetic, or
(b) the radix divide or multiply method with base A arithmetic.
To convert a number N from base A to base B, use
(a) the series substitution method with base 10 arithmetic to convert N from base A to base 10, and
(b) the radix divide or multiply method with decimal arithmetic to convert N from base 10 to base B.
Chapter 1
(18.6)9 = ( ? )11
(a) Convert to base 10 using series substitution method:
N10 = 1 ´ 91 + 8 ´ 90 + 6 ´ 9-1
= 9 + 8 + 0.666…
= (17.666…)10
(b) Convert from base 10 to base 11 using radix divide and multiply
method:
7.326 ¬ 0.666 ´ 11
3.586 ¬ 0.326 ´ 11
6.446 ¬ 0.586 ´ 11
N11 = (16.736 …)11
Chapter 1
(a) To convert a number N from base A to base B when B = Ak and k is a positive integer, group the digits of N in groups of k digits in both directions from the radix point and then replace each group with the equivalent digit in base B
(b) To convert a number N from base B to base A when B = Ak and k is a positive integer, replace each base B digit in N with the equivalent k digits in base A.
Chapter 1
N = (san-1 ... a0.a-1 ... a-m)rsm, (1.6)
where s = 0 if N is positive and s = r -1 otherwise.
[N]r = rn - (N)r(1.7)
where n is the number of digits in (N)r.
[N]r-1 = rn - (N)r - 1
Chapter 1
[N]2 = 26 - (101001)2 = (1000000)2 - (101001)2 = (010111)2
If we discard the carry, (N)2 + [N]2 = 0.
Hence, [N]2 can be used to represent -(N)2.
[N]2 = (1000000)2 - (1010)2 = (110110)2.
[N]10 = (100000)10 - (72092)10 = (27908)10.
Chapter 1
Chapter 1
N = 01100101
10011010 Complement the bits
+1 Add 1
[N]2 = (10011011)10
N = 40960
59039 Complement the bits
+1 Add 1
[N]2 = (59040)10
Chapter 1
where .
where .
when (N)2 = (1011001)2 for n = 8:
Chapter 1
Chapter 1
, where n is the number of bits.
(where B³ 0 and C ³ 0.)
Chapter 1
Chapter 1
= +(0101)2 = +(5)10
Chapter 1
= -(0101)2 = -(5)10
= (0, 1010)2cns
= (0, 1110)2cns = +(1110)2 = +(14)10
Chapter 1
= -(1111)2 = -(15)10
Chapter 1
= (0, 1000111)2cns = +(71)10
= (1, 0111001)2cns + carry = -(0, 1000111)2cns = -(71)10
= (0, 0010101)2cns + carry = +(21)10
Chapter 1
Chapter 1
[N]r-1 = rn - (N)r - 1(1.10)
[N]2-1 = 2n - (N)2 - 1(1.11)
[N]2-1 = 28 - (01100101)2 - 1
= (100000000)2 - (01100101)2 - (00000001)2
= (10011011)2 - (00000001)2
= (10011010)2
Chapter 1
[N]2-1 = 105 - (40960)10 - 1
= (100000)10 - (40960)10 - (00001)10
= (59040)10 - (00001)10
= (59039)10
Replace each digit aiof (N)r by r - 1 - a. Note that when r = 2, this simplifies
to complementing each individual bit of (N)r .
[N]r= [N]r-1 + 1(1.12)
Chapter 1
One’s complement of +(1001) = 01001
One’s complement of -(0100) = 11011
01001 + 11011 = 100100 (carry)
Add the carry to the result: correct result is 00101.
One’s complement of +(1001) = 01001
One’s complement of -(1111) = 10000
01001 + 10000 = 11001 (no carry, so this is the correct result).
Chapter 1
One’s complement of the operands are: 10110 and 11100
10110 + 11100 = 110010 (carry)
Correct result is 10010 + 1 = 10011.
Nine’s complements of the operands are: 075 and 978
075 + 978 = 1053 (carry)
Correct result is 053 + 1 = 054
Nine’s complements of the operands are: 021 and 924
021 + 924 = 945 (no carry, so this is the correct result).
Chapter 1
Chapter 1
Chapter 1
Chapter 1
where be-1 is the sign bit.
N = (SMbe-1be-2 ... b0an-1 ... a-m)r (1.17)
representing N = (1.18)
Chapter 1
N = M´ rE(1.19)
= (M¸ r) ´rE+1(1.20)
= (M´r) ´rE-1(1.21)
M = +(1101.0101)2
= (0.11010101)2´ 24(1.22)
= (0.011010101)2´ 25(1.23)
= (0.0011010101)2´ 26(1.24)
…
Chapter 1
Chapter 1
E = 00110 + 10000 = 10110
So, E = (1, 0110)excess-16
N = (0, 1, 0110, 1011011010)fp
Chapter 1
0: 00001: 00012: 00103: 00114: 0100
5: 01016: 01107: 01118: 10009: 1001
Chapter 1
CharacterBinary CodeHexadecimal Code
D 1000100 44
i 1101001 69
g 1100111 67
i 1101001 69
t 1110100 74
a 1100001 61
l 1101100 6C
Chapter 1
Chapter 1
Chapter 1
d(I, J) ³ dmin
2t + s + 1 £ dmin (1.25)
s = t = 1, dmin = 4.
Chapter 1
Chapter 1
Chapter 1
Chapter 1
an error word with single error: ce
the correct code word for the error word: c
then, d(ce,c) = 1 and d(ce, w) > 1 for all other w ÎC (see Table 1.15)
Chapter 1
c = (i3i2i1i0c2c1c0)
c2: i3, i2, i1 c1: i3, i2, i0c0: i3, i1, i0
(1.26)
c = iG(1.27)
Chapter 1
(1.28)
HcT = 0(1.29)
d = c + e(1.30)
Chapter 1
s = HdT(1.31)
= H(c + e)T
= HcT + HeT
= 0 + HeT
= HeT(1.32)
Chapter 1
(1.33) (1.34)
Odd-weight-column code:
Chapter 1
(1.35)
Chapter 1
(1.36)(1.37)
Chapter 1