1.1 Number System
1.1 Number System
Chapter 1 11
Number Systems (2)
• Binary numbers
– Digits = {0, 1}
– (11010.11)2 = 1 x 24 + 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 + 1 x 2-1 + 1 x 2-2
= (26.75)10
– 1 K (kilo) = 210 = 1,024, 1M (mega) = 220 = 1,048,576,
1G (giga) = 230 = 1,073,741,824
• Octal numbers
– Digits = {0, 1, 2, 3, 4, 5, 6, 7}
– (127.4)8 = 1 x 82 + 2 x 81 + 7 x 80 + 4 x 8-1 = (87.5)10
• Hexadecimal numbers
– Digits = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}
– (B65F)16 = 11 x 163 + 6 x 162 + 5 x 161 + 15 x 160 = (46,687)10
Chapter 1 12
Number Systems (3)
• Important Number Systems (Table 1.1)
Decimal Binary Octal Hexadecimal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 1 F
16 10000 20 10
Chapter 1 13
Arithmetic (1)
• Binary Arithmetic
– Addition
111011 Carries
101011 Augend
+ 11001 Addend
1000100
– Subtraction
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 14
Arithmetic (2)
– Multiplication 110
Division
Quotient
Divider 1001 111101 Dividend
1 1 0 1 0 Multiplicand 1001
x 1 0 1 0 Multiplier 1100
0 0 0 0 0 1001
111 Remainder
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 15
Arithmetic (3)
• Octal Arithmetic (Use Table 1.4)
– Addition
1 1 1 Carries
5 4 7 1 Augend
+ 3 7 5 4 Addend
11445 Sum
– Subtraction
6 10 4 10 Borrows
7 4 5 1 Minuend
- 5 6 4 3 Subtrahend
1 6 0 6 Difference
Chapter 1 16
Arithmetic (4)
1 0 1 1 Carries
5 B A 9 Augend
+ D 0 5 8 Addend
1 2 C 0 1 Sum
– Subtraction
9 10 A 10 Borrows
A 5 B 9 Minuend
+ 5 8 0 D Subtrahend
4 D A C Difference
– (627)8 ® ( ? )10
– (11110.101)2 ® ( ? )8
– (2AD.42)16 ® ( ? )10
Chapter 1 18
Arithmetic (6)
– Multiplication Division
79B Quotient
Divider B9 57F6D Dividend
50F
B9A5 Multiplicand 706
681
85D
x D50 Multiplier 7F3
Remainder 6A
3A0390 Partial products
96D61
9A76490 Product
Chapter 1 19
Base Conversion (1)
• Series Substitution Method
– Expanded form of polynomial representation:
N = an-1rn-1 + … + a0r0 + a-1r-1 + … + a-mr-m (1.3)
– Conversation Procedure (base A to base B)
• Represent the number in base A in the format of Eq. 1.3.
• Evaluate the series using base B arithmetic.
– Examples:
• (11010)2 ®( ? )10
N = 1´24 + 1´23 + 0´22 + 1´21 + 0´20
= (16)10 + (8)10 + 0 + (2)10 + 0
= (26)10
• (627)8 ® ( ? )10
N = 6´82 + 2´81 + 7´80
= (384)10 + (16)10 + (7)10
= (407)10
Chapter 1 20
Roman Number System
I 1 X 10 C 100
II 2 XX 20 CC 200
IV 4 XL 40 CD 400
V 5 L 50 D 500
VI 6 LX 60 DC 600
IX 9 CX 90 CM 900
X 10 C 100 M 1000
Rule of Roman Numeral
• To write numbers in Roman numerals, we can use
the following rules:
• The symbols I, X, C, and M can be repeated up to
three times in a row.
• When a smaller value symbol appears before a
larger value symbol, the smaller value is subtracted.
For example, IV represents 4 (5 – 1) and IX
represents 9 (10 – 1).
• When a smaller value symbol appears after a larger
value symbol, the smaller value is added. For
example, VI represents 6 (5 + 1) and XI represents
11 (10 + 1).
• Problem 1: Convert (4525)8 into a decimal.
• Problem 2: Convert (17)10 as a binary number.
• Problem 3: Convert (1011110)2 into an octal
• Problem 4: Convert the Roman numeral
XLVIII into its decimal equivalent.
• Problem 5: Convert the Roman numeral
MCCXLV into its decimal equivalent.
• Solution:
• (4525)8 = 4 × 83 + 5 × 82 + 2 × 81 + 5 × 80
• ⇒ 45258 = 4 × 512 + 5 × 64 + 2 × 8 + 5 × 1
• ⇒ 45258 = 2048 + 320 + 16 + 5
• ⇒ 45258 = 238910
Therefore (17)10 = (10001)2
Octal Number Binary Number
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111