The words you are searching are inside this book. To get more targeted content, please make full-text search by clicking here.
Discover the best professional documents and content resources in AnyFlip Document Base.
Search
Published by kancil3895, 2022-09-25 09:53:22

CHAPTER 1

NUMBERING SYSTEM

CHAPTER 1 : NUMBERING SYSYTEM

CHAPTER 1
NUMBERING SYSTEM

JANET HO SIEW CHING

CHAPTER 1 : NUMBERING SYSYTEM

1.0 Numbering System
A numbering system is a systematic method to represent numbers in computer system
architecture, where every value in saving or getting into/from computer memory has a
defined number system.

1.1 Describe the concepts of numbering system.
Computers represent all kinds of information and data from audio, images, videos, and
etc. However, computers only understand numbers. Computer and digital devices used
Binary system.

In Computer System Architecture, there is a unique technique of representing numbers
called Number System. The number system supported by Computer architecture is
shown as below:-

Number Systems

Decimal Binary Octal Hexadecimal

- Most used in - Only use two - The base of - The word
numbering digits, 0 and 1. octal number comes from
system. system is 8, Hexa meaning
- Based-2. because it has 16.
- Based-10. - Digits allowed only 8 digits.
- Based-16.
- Digits allowed 0 and 1. - Based-8.
0 – 9. - Example: 1012 - Digits allowed
- Digits allowed 0 – 9, and
- 10Example: 0 – 7. A – F.
7110
- Example: 778 - Example: A1F16

CHAPTER 1 : NUMBERING SYSYTEM

Hexadecimal numbers use digits from 0 – 15. However, the digits cannot repeat after
9. Hence, Alphabet (A, B, C) is used to replace the other 6 digits. The differences of
numbering system as shown in below table: -

Decimal Binary Octal Hexadecimal
(Base 10) (Base 2) (Base 8) (Base 16)
0
0 0000 00 1
1 0001 01 2
2 0010 02 3
3 0011 03 4
4 0100 04 5
5 0101 05 6
6 0110 06 7
7 0111 07 8
8 1000 9
9 1001 A (10)
1010 B (11)
1011 C (12)
1100 D (13)
1101 E (14)
1110 F (15)
1111

Different types of number systems as they relate to computers.

Numbering System Base Seen In

Binary 2 Programming – Booleans

Decimal 10 Standard Numbering System
Hexadecimal 16 Designing – Colour Values

Sexagesimal 60 Time (secs/mins) & Angles (360)

CHAPTER 1 : NUMBERING SYSYTEM

1.2 Define data organization:

Computer process to read or write data depends on
switch ON and OFF. A SWITCH ON is
corresponding to 1, and OFF corresponding O.

Input data is converted into digital signals and passes
from component to component, and in storing
devices (memory or register) it is converted into
binary or machine codes.

Tips :
Most Significant Bit (MSB) = the last digit on left of any number systems.
Least Significant Bit (LSB) = the last digit on right of any number systems.

Bit Bit is short form for BInary digit.
A single numerical unit in the binary number system.
Smallest unit of measurement used to quantify computer data.

Nibble A group of 4 bits together is called nibble.

Byte A group of 8 bits together is called byte.
Can represent a character or a special symbol in a character code.

Word A group of 16 bits together is called word.
A Double word is typically 32 bits long.
A Quad word is typically 64 bits long

CHAPTER 1 : NUMBERING SYSYTEM

 Example 1

Convert : 16 bits in term of Nibbles

Given = 16 bits Convert given info into ‘Bits’.
4 words = 4 x 16 = 64 bits

1 Nibbles = 4 bits ÷ answers
16 bits = 16 ÷ 4 = 4 Nibbles

 Example 2

Convert : 4 Bytes in term of bits

1 Bytes = 8 bits
4 Bytes = 4 × 8 = 32 bits
4 words = 4 x 16 = 64 bits

a. Express b. Express
4 words in terms of nibbles. 8 nibbles of data in terms of words

Answer: 16 Answer: 2 word
Nibbles

CHAPTER 1 : NUMBERING SYSYTEM

1.3 Conversion of Numbering System

When we type some letters or words, the computer translates them in numbers, where
computer only used the binary system, base 2.

For example, it is easier to express in hexadecimal, base 16, taking four bits at a time.
When we use the decimal system, it is necessary for the computers to program and
convert from the hexadecimal system back to the decimal system that we are familiar
with. In other words, computer only understand binary number, while human more
familiar with decimal number. This is the reason for the conversion. The conversion
process applies to other bases with different method.

Below is the summary on how to convert in numbering system:-

CHAPTER 1 : NUMBERING SYSYTEM

1.3.1 Convert Binary to Decimal Number
To convert Number System to Decimal Number System:-

i. Determine the position of each digit (Label it).
ii. Multiply each digit ~ position value × Base of Source Number.
iii. Add the resulted value.

29 28 27 26 25 24 23 22 21 20
512 256 128 64 32 16 8 4 2 1

 Example 1

Convert 10100012 to Decimal Number.

10 1 0 0 0 1 Label it…
26 25 24 23 22 21 20

= (1 × 26 ) + ( 0 × 25 ) + (1 × 24 ) + (0 × 2 3 ) + (0 × 22 ) + ( 0 × 21 ) + (1 × 20 )
= 64 + 16 + 1
= 81

10100012 = 8110

 Example 2 Label it…
2 3 22 21 20
Convert 10012 to Decimal Number.
1 0 0 12
1001
= (1 × 23 ) + ( 0 × 22 ) + ( 0 × 21 ) + (1 × 20 )
= ( 1 × 8) + ( 1 × 1)
=8+1
=9

10012 = 910

a. Convert 1112 to Decimal Number. b. Convert 102 to Decimal Number.
Answer: 210
Answer: 710
d. Convert 11002 to Decimal Number.
c. Convert 11010010002 Answer: 1210
to Decimal Number.
Answer: 84010

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Binary to Decimal Number
Below table can be used for the calculation on the conversion:-

24 23 22 21 20 . 2-1 2-2 2-3 2-4
16 8 4 2 1 . 0.5 0.25 0.125 0.0625

 Example 3

Convert 101.112 to Decimal Number.

10 1 . 11
22 21 20 . 2-1 2-2

421 . 0.5 0.25

= [ (1 × 4) + (1 × 1)] . [ (1 × 0.5) + (1 × 0.25) ]
= 5.7510

101.112 = 5. 7510

 Example 4

Convert 11.0112 to Decimal Number.

11 . 01 1

21 20 . 2-1 2-2 2-3

21 . 0.5 0.25 0.125

= [ (1 × 2) + (1 × 1)] . [ (1 × 0.25) + (1 × 0.125) ]
= 3.37510

11.0112 = 3. 37510

e. Convert 10.102 to Decimal Number. f. Convert 10.012 to Decimal Number.
Answer: 2.2510
Answer: 2.510
h. Convert 1100.012 to Decimal Number.
g. Convert 11.0102 Answer: 12.2510
to Decimal Number.
Answer: 3.2510

CHAPTER 1 : NUMBERING SYSYTEM

1.3.2 Convert Binary to Octal Number

3-bit binary number set is equavalent to octal number as shown in below :-

22 21 20

421

 Example 1

Convert 1011112 to Octal Number.

101 1112 Group the number start from right (3 digit one group)

101 111
421 421
1×4 0×2 1×1 1×4 1×2 1×1

4+0+1 4+2+1
5 7

1011112 = 578

 Example 2
Convert 11001012 to Octal Number.
1 100 1012

1 100 101
421 421 421
4+0+0 4+0+1
1
1 4 5

11001012 = 1458

 Example 3

Convert 10101111002 to Octal Number.

= (1010111100)2
= ( 001 010 111 100 )2
= ( 1 2 7 4 )8
= 12748

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Binary to Octal Number

 Example 4
Convert 110011.10112 to Octal Number.

= (110 011.1011)2 Group it to 3 digit one group
= ( 110 011 . 101 1 )2 (before point@decimal, start from right)
= ( 110 011 . 101 100 )2
= ( 6 3 . 5 4 )8 (after point@decimal, start from left)
= 63.548

110011.10112 = 63.548

 =
Example 5

Convert 1101.102 to Octal Number.

= (1101 . 10)2
= ( 1 101 . 10 )2
= ( 001 101 . 100 )2
= ( 1 5 . 4 )8
= 15.48

1101.102 = 15.48
=

a. Convert 1112 to Octal Number. b. Convert 1110001112 to Octal
Answer: 78
Number. Answer: 7078
c. Convert 11010010002 to Octal Number.
Answer: 15108 d. Convert 11002 to Octal Number.
Answer: 148

CHAPTER 1 : NUMBERING SYSYTEM

1.3.3 Convert Binary to Hexadecimal Number

4-bit binary number set is equavalent to Hexadecimal number as shown in below :-

8421

 Example 1

Convert 101011112 to Hexadecimal Number.

1010 11112 Group the number start from right (4 digit one group)

1 01 0 1 11 1
8 42 1 8 42 1
1×8 0×4 1×2 0×1 1×8 1×4 1×2 1×1
8+0+2+0 8+4+2+1

10 (A) 15 (F)

101011112 = AF16

 Example 2
Convert 110012 to Hexadecimal Number.
1 10012

0001 1001
8421 8421

0+0+0+1 8+0+0+1
1 9

11001012 = 1916

a. Convert 1112 to b. Convert 111002 to
Hexadecimal Number. Hexadecimal Number.

Answer: 716 Answer: 1C16

c. Convert 111000002 to d. Convert 1100111100012 to
Hexadecimal Number. Hexadecimal Number.
Answer: E016 Answer: CF116

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Binary to Hexadecimal Number
The decimal part of conversion can use the table as shown below :-

8421 . 248

 Example 3

Convert 11001.012 to Hexadecimal Number.

First, the number before decimal (11001),

1 10012 Group the number start from right (4 digit one group)

0001 1001
8421 8421
0+0+0+1=1 8+0+0+1=9

Second, the number after decimal (01),

01 Multiply & total it
24
(0 × 2) + (1 × 4) = 4

11001.012 = 19.4 16 Combine the answer

e. Convert 111.012 to f. Convert 100.112 to
Hexadecimal Number. Hexadecimal Number.

Answer: 7.416 Answer: 4.C16

g. Convert 111000.102 to h. Convert 1100.1112 to
Hexadecimal Number. Hexadecimal Number.
Answer: 38.216 Answer: C.E16

CHAPTER 1 : NUMBERING SYSYTEM

1.3.4 Convert Decimal to Binary Number
To convert Number system from Decimal Number System to Any Other Base:-
i) Divide the Number (Decimal Number) by the base of target base system ~ in which you
want to convert the number: Binary (2). ii) Write the remainder from bottom to top.

 Example 1 Step 1 : Divide the number with base,
Write the remaining at right side,
Convert 12310 to Binary Number. : Rewrite from bottom to top

2 123 If use calculator,
2 61 - 1 remaining anwer need × 2
2 30 - 1
2 15 - 0
2 7-1
2 3-1
2 1-1

0-1

12310 = 11110112

 Example 2

Convert 3010 to Binary Number.

2 30
2 15 - 0
2 7 - .5 × 2 = 1
2 3 - .5 × 2 = 1
2 1 - .5 × 2 = 1

0 - .5 × 2 = 1

3010 = 111102

a. Convert 7710 to Binary Number. b. Convert 45610 to Binary Number.
Answer: 10011012 Answer: 1110010002

c. Convert 1110 to Binary Number. d. Convert 910 to Binary Number.
Answer: 10112 Answer: 10012

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Decimal to Binary Number

 Example 3

Convert 12.7510 to Binary Number.

First,
Number before decimal (4), we divide (÷) with 2.

2 12 Step 2 : Number before decimal, ÷ 2
2 6-0
2 3-0
2 1-1

0-1

Second,
Number after decima (0.47), we multiply (×) with 2.

0.75 × 2 = 1.5 Integer Step 3 : Number after decimal, × 2
0.5 × 2 = 1.0 1 Repeat the steps until the quotient is
- 1
0.0 - equal to 0.

12.7510 = 1100.112 Step 4 : Combine & write the answer

111.011110...2 If infinity/answer not yet finish, write …., follow by base.

Normally, only need write 3 place after decimal.

e. Convert 4.4710 to Binary Number. f. Convert 5.8910 to Binary Number.
Answer: 100.011110...2 Answer: 101.1110...2

g. Convert 11.210 to Binary Number. h. Convert 9.510 to Binary Number.
Answer: 1011.00110...2 Answer: 1001.12

CHAPTER 1 : NUMBERING SYSYTEM

1.3.5 Convert Decimal to Octal Number
To convert Number system from Decimal Number System to Any Other Base:-
i) Divide the Number (Decimal Number) by the base of target base system ~ in which you
want to convert the number: octal (8).
ii) Write the remainder from bottom to top.

 Example 1 Step 1 : Divide the number with base
Sntuepm2be:rWomritreigthhet r(3emdiagiintionngeagtrroiguhpt) side
Convert 12310 to Octal Number.
Step 3 : Multiply remaining with base
8 123
8 15 - .375 × 8 = 3 Step 4 : Rewrite from bottom to top
8 1 - .875 × 8 = 7

0 - .125 × 8 = 1

12310 = 1738

 Example 2

Convert 3010 to Octal Number.

8 30
8 3 - .75 × 8 = 6

0 - .375 × 8 = 3
3010 = 368

a. Convert 45610 to Octal Number. b. Convert 400110 to Octal Number.
Answer: 7108 Answer: 76418

c. Convert 4410 to Octal Number. d. Convert 1410 to Octal Number.
Answer: 548 Answer: 168

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Decimal to Octal Number

 Example 3

Convert 225.22510 to Octal Number.

First,
Number before decimal (4), we divide (÷) with 8.

8 225 Step 2 : Number before decimal, ÷
8 28 - 1
8 3-4

0-3

Second,
Number after decima (0.47), we multiply (×) with 8.

0.225 × 8 = 1.800 Integer Step 3 : Number after decimal, ×.
0.800 × 8 = 6.400 1 Repeat the steps until the
0.400 × 8 = 3.200 6 quotient is equal to 0.
0.200 × 8 = 1.600 3
0.600 × 8 = 4.800 1
4

225.22510 = 341.16314...8 Step 4 : Combine & write the answer

e. Convert 16.410 to Octal Number. f. Convert 3.510 to Octal Number.
Answer: 20.314631..8 Answer:3.48

g. Convert 83.3310 to Octal Number. h. Convert 9.510 to Octal Number.
Answer: 123.250753...2 Answer: 11.48

CHAPTER 1 : NUMBERING SYSYTEM

1.3.6 Convert Decimal to Hexadecimal Number
To convert Number system from Decimal Number System to any other base:-
i) Divide the Number (Decimal Number) by the base of target base system ~ in which you
want to convert the number: Hexadecimal (16).
ii) Write the remainder from bottom to top.

 Example 1

Convert 12310 to Hexadecimal Number. Step 1 : Divide the number with base
number om right (3 digit one group)
16 123
7 - .6875 × 16 = 11
0 - .4375 × 16 = 7

12310 = 7B16 Step 4 : Rewrite from bottom to top.
No.10 – 15 change to Alphabet

 Example 2

Convert 3010 to Hexadecimal Number.

16 30
16 1 - .875 ×16 = 14

0 - .0625 × 16 = 1
3010 = 1E16

a. Convert 9910 to b. Convert 11110 to
Hexadecimal Number. Hexadecimal Number.

Answer: 6316 Answer: 6F16

c. Convert 100010 to d. Convert 80110 to
Hexadecimal Number. Hexadecimal Number.
Answer: 32116
Answer: 3E816

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Decimal to Hexadecimal Number

 Example 3

Convert 123.310 to Hexadecimal Number.

First,
Number before decimal, we divide (÷) with 16.

16 123
16 7 - 0.6875 × 16 = 11

0-7

Second,
Number after decimal, we multiply (×) with 16.

0.3 × 16 = 4.800 Integer
0.800 × 16 = 12.800 4
0.800 × 16 = 12.800
12 (C)
12 (C)

123.310 = 7B.4CC...16

e. Convert 16.410 to f. Convert 3.510 to
Hexadecimal Number. Hexadecimal Number.

Answer: 10.666..16 Answer:3.816

g. Convert 83.3310 to h. Convert 9.510 to
Hexadecimal Number. Hexadecimal Number.
Answer: 53.547AE16
Answer: 9.816

CHAPTER 1 : NUMBERING SYSYTEM

1.3.7 Convert Octal to Decimal Number
To convert Number System to Decimal Number System:-

i. Determine the position of each digit.
ii. Multiply each digit ~ position value × Base of Source Number.
iii. Add the resulted value.

86 85 84 83 82 81 80
262144 32768 4096 512 64 8 1

 Example 1

Convert 1238 to Decimal Number. Determine the position of each digit,
multiply, add the value.
123
82 81 80

1 × 82 2 × 81 3 × 80
1 × 64 2 × 8 3 × 1

= 64 + 16 + 3 = 83
1238 = 8310

 Example 2

Convert 13018 to Decimal Number.

1301
= (1 × 83 ) + ( 3 × 82 ) + ( 0 × 81 ) + (1 × 80 )
= ( 1 × 512) + (3 × 64) + ( 1 × 1)
= 512 + 192 + 1
= 705

13018 = 70510

a. Convert 1118 to Decimal Number. b. Convert 138 to Decimal Number.
Answer: 7310 Answer: 1110

c. Convert 70008 to Decimal Number. d. Convert 1708 to Decimal Number.
Answer: 358410 Answer: 12010

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Octal to Decimal Number
To convert Number System to Decimal Number System, can refer below table:-

82 81 80 . 8-1 8-2 8-3
64 8 1 . 0.125 0.0156 0.002

 Example 3

Convert 17.58 to Decimal Number.

81 80 . 8-1
81 . 0.125
17 .5

17.5
= (1 × 8 ) + ( 7 × 1 ) . ( 5 × 0.125)
= 15 . 625

17.58 = 15.62510

 Example 4

Convert 315.108 to Decimal Number.

82 81 80 . 8-1 8-2
64 8 1
315 . 0.125 0.0156

.1 0

315.10
= (3 × 64 ) + ( 1 × 8 ) + ( 5 × 1 ) . ( 1 × 0.125)
= 205 . 125

17.58 = 205.12510

e. Convert 111.18 to Decimal Number. f. Convert 1.38 to Decimal Number.
Answer: 73.12510 Answer: 1.37510

g. Convert 70.18 to Decimal Number. h. Convert 1.78 to Decimal Number.
Answer: 56.12510 Answer: 1.87510

CHAPTER 1 : NUMBERING SYSYTEM

1.3.8 Convert Octal to Binary Number

In Octal number system, there are only 8 digits (from 0 to 7). So, we can represent digit of

octal number system using only 3 bit as following. The total of 3 bit binary number equal to

the Octal digit value.

Octal Digit Value Binary Equivalent 4+2+1=7
0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

 Example 1

Convert 1238 to Binary Number. StSeparate each digit.
Put 1 or 0 to get the total.

1 2 3
421 421 421
001 010 011

1238 = 10100112

 Example 2

Convert 3708 to Binary Number.

3 7 0
421 421 421
011 111 000

3708 = 111110002

a. Convert 778 to Binary Number. b. Convert 1078 to Binary Number.
Answer: 1111112 Answer: 10001112

c. Convert 0338 to Binary Number. d. Convert 308 to Binary Number.
Answer: 110112 Answer: 110002

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Octal to Binary Number
The total of 3 bit binary number equal to the Octal digit value.

 Example 3

Convert 12.38 to Binary Number.

1 23
421
001 421 . 421
010 011

12.38 = 1010.0112

 Example 4

Convert 37.68 to Binary Number.

3 76
421
011 421. 421
111 110

37.68 = 11111.1102

 Example 5

Convert 11.68 to Binary Number.

1 16
421
001 421. 421
001 110

11.68 = 1001.1102

e. Convert 77.78 to Binary Number. f. Convert 107.18 to Binary Number.
Answer: 111111.1112 Answer: 1000111.0012

g. Convert 73.38 to Binary Number. h. Convert 330.68 to Binary Number.
Answer: 111011.0112 Answer: 11011000.1102

CHAPTER 1 : NUMBERING SYSYTEM

1.3.9 Convert Octal to Hexadecimal Number
Octal number cannot convert directly to Hexadecimal number. The usual practice is by (i)
converting octal into binary number, then further (ii) convert the binary number to
hexadecimal.

 Example 1 (Method 1)

Convert 1238 to Hexadecimal Number.

1 2 3 Convert
421 421 421 to binary number.
001 010 011
Convert to
1238 = 10100112 Hexadecimal.

101 0011
8421 8421

5 3

1238 = 5316

 Example 2 (Method 1)

Convert 378 to Hexadecimal Number.

3 7
421 421
011 111

378 = 0111112 1111
8421
01
8421 15 (F)

1

378 = 1F16

a. Convert 778 to b. Convert 7078 to
Hexadecimal Number. Hexadecimal Number.

Answer: 3F16 Answer: 1C7.E16

CHAPTER 1 : NUMBERING SYSYTEM

 Example 3 (Method 2)

Convert 1238 to Hexadecimal Number. Step 1 : Convert to Decimal Number

1st, convert to Decimal number. - Separate each digit
- Multiply, total the value.
123
82 81 80
1 × 82 2 × 81 3 × 80
1 × 64 2 × 8 3 × 1

= 64 + 16 + 3 = 83

1238 = 8310

2nd, from Decimal number, convert to Hexadecimal number.

16 83 - .1875 × 16 = 3 Step 2 : From Decimal Number
16 5 - .3125 × 16 = 5 convert to Hexadecimal Number.

0 - Divide the number with 16.

1238 = 5316

c. Convert 4568 to d. Convert 3332 to
Hexadecimal Number. Hexadecimal Number.

Answer: 12E16 Answer: DB16

e. Convert 11118 to f. Convert 1058 to
Hexadecimal Number. Hexadecimal Number.

Answer: 24916 Answer: 4516

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Octal to Hexadecimal Number
Octal number cannot convert to Hexadecimal number directly. Follow the step-by-step as
shown in example below:-

 Example 4

Convert 12.38 to Hexadecimal Number.

1 23
421
001 421 . 421
010 011

1238 = 1010.0112

1010 0110

8421 . 8421
10 (A) 6

12.38 = A.616

 Example 5

Convert 3.78 to Hexadecimal Number.

3 7
421
4 2 1. 111

011

3.78 = 11.1112

11 1110

8421 . 8421

3 14 (E)

3.78 = 3.E16

g. Convert 77.58 to h. Convert 707.78 to
Hexadecimal Number. Hexadecimal Number.

Answer: 3F.A16 Answer: 1F8.E16

CHAPTER 1 : NUMBERING SYSYTEM

1.3.10 Convert Hexadecimal to Decimal Number
To convert Number System to Decimal Number System:-

i. Determine the position of each digit.
ii. Multiply each digit ~ position value × Base of Source Number.
iii. Add the resulted value.

165 164 163 162 161 160

1048576 65536 4096 256 16 1

 Example 1

Convert 1B316 to Decimal Number.

1B3 Step 1 : Determine the position, multiply,
162 161 160 then, add all value.

1 × 162 11 × 161 3 × 160
1 × 256 11 × 16 3 × 1

= 256 + 176 + 3 = 83
1B316 = 43510

 Example 2

Convert AA16 to Decimal Number.
A = 10

= ( 10 × 161 ) + (10 × 160 )
= ( 10 × 16) + ( 10 × 1)
= 160 + 10
= 170

AA16 = 17010

a. Convert 1A16 to Decimal Number. b. Convert EE16 to Decimal Number.
Answer: 2610 Answer: 23810

c. Convert ABC16 to Decimal Number. d. Convert 8816 to Decimal Number.
Answer: 274810 Answer: 13610

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Hexadecimal to Decimal Number

Table below can be refered:- 161 160 . 16-1 16-2
163 162 . 0.0625 0.004

4096 256 16 1

 Example 3

Convert BB.316 to Decimal Number.
B=11

161 160 . 16-1
16 1 . 0.0625
11 11 .3

= ( 11 × 16) + ( 11 × 1) . ( 3 × 0.0625)

= 187 . 1875

BB.316 = 187 . 187510

 Example 2

Convert ABC.8616 to Decimal Number.
A= 10, B=11, C= 12

162 161 160 . 16-1 16-2
256 16 1
10 11 12 . 0.0625 0.004

.8 6

= ( 10 × 256) + ( 11 × 16) + ( 12 × 1) . ( 8 × 0.0625) + ( 6 × 0.004)

= (2560 + 176 + 12) . (0.5 + 0.024)
= 2748 . 52410

ABC.8616 = 2748 . 52410

e. Convert 1A.C16 to Decimal Number. f. Convert E.E16 to Decimal Number.
Answer: 26.7510 Answer: 14.87510

CHAPTER 1 : NUMBERING SYSYTEM

1.3.11 Convert Hexadecimal to Binary Number
Each digit of Hexadecimal number is separate to a group of 4-bit together before convert.
 Example 1

Convert AB16 to Binary Number.

A (10) B (11) StepSeparate digit, group under 4-bit,
8421 8421 Put ‘1’ or ‘0’ to total up value
1010 1011

AB16 = 1010 10112

 Example 2

Convert DAD16 to Binary Number.

D (13) A (10) D (13)
8 42 1 8 4 21 8 4 21
1 10 1 1 0 10 1 1 01

DAD16 = 1101 1010 11012

 Example 3

Convert 3AF16 to Binary Number.

3 A (10) F (15)
8 42 1 8 4 21 8 4 21
0 01 1 1 0 10 1 1 11

3AF16 = 11 1010 11112

a. Convert 1C16 to Binary Number. b. Convert CD516 to Binary Number.
Answer: 11100 2 Answer: 110011010101 2

c. Convert AA16 to Binary Number. d. Convert E1E16 to Binary Number.
Answer: 10101010 2 Answer: 111000011110 2

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Hexadecimal to Binary Number
Each digit of Hexadecimal number is separate to a group of 4-bit together before convert.
 Example 4

Convert A.B16 to Binary Number.

A (10) B (11)
8421
8 4 2 1 . 1011
1 0 1 0

AB16 = 1010. 10112

 Example 5

Convert 1A.D16 to Binary Number.

1 A (10) D (13)
8 42 1
0 00 1 8 4 21 .8 4 21
1 0 10 1 1 01

DAD16 = 11010 . 11012

 Example 6

Convert 3.AF16 to Binary Number.

3 A (10) F (15)
8 42 1 8 4 21
0 01 1 .8 4 21 1 1 11

1 010

3AF16 = 11 . 101011112

e. Convert 1.C16 to Binary Number. f. Convert CD.516 to Binary Number.
Answer: 1.1100 2 Answer: 11001101.01012

g. Convert 3.AA16 to Binary Number. h. Convert E.1E16 to Binary Number.
Answer: 11.10101012 Answer: 1110.00011112

CHAPTER 1 : NUMBERING SYSYTEM

1.3.12 Convert Hexadecimal to Octal Number
Hexadecimal number cannot convert directly to Octal number. It need to convert to Binary
number, before convert to Octal number.

 Example 1
Convert 12316 to Octal Number.

1 2 3 Step 1 : Convert to Binary
8421 8421 8421 Step 2 : Convert to Octal
0001 0010 0011

12316 = 1 0010 00112

100 100 011
421 421 421

4 4 3

12316 = 4438

 E1x2a3m8p=le52316
Convert 1A016 to Octal Number.

1 A (10) 0
8421 8421 8421
0001 1010 0000

12316 = 1 0010 00112

110 100 000
421 421 421

6 4 0

12316 = 6408

a. Convert C716 to Octal Number. b. Convert A716 to Octal Number.
Answer: 3078 Answer: 2478

c. Convert ABC16 to Octal Number. d. Convert 45616 to Octal Number.
Answer: 52748 Answer: 21268

CHAPTER 1 : NUMBERING SYSYTEM

Convert Fraction Hexadecimal to Octal Number

 Example 3
Convert 12.316 to Octal Number.

1 23
8421
0001 8421.8421

0010 0011

12.316 = 1 0010 . 00112

010 010 001 100
421 421
421.421
2 4
21

12.316 = 22.148

 E1x2a3m8p=le54316
Convert 1.A516 to Octal Number.

1 A (10) 5
8421
8421 .8421 0101

0001 1010

1.A516 = 1 . 101001012

001 101 001 010
421 421
4 2 1 . 421
1 2
15

1.A516 = 1. 5128

e. Convert C.716 to Octal Number. f. Convert 1.A716 to Octal Number.
Answer: 14.348 Answer: 1.5168

g. Convert A.BC16 to Octal Number. h. Convert 45.616 to Octal Number.
Answer: 12.578 Answer: 105.38

CHAPTER 1 : NUMBERING SYSYTEM

1.4 Apply Binary Arithmetic
In the binary number system, there are only two digits 0 and 1. The arithmetic of binary
numbers means the operation of binary addition, binary subtraction, binary multiplication
and binary division. Binary arithmetic operation starts from the least significant bit
(calculation start from the rightmost side).

Addition Subtraction Multiplication Division
(+) ( ×) (÷)
(-)
0+0=0 0–0=0 0×0=0 0÷1=0
0+1=1 1–0=1 0×1=0 1÷1=1
1+0=1 1–1=0 1×0=0 0 ÷ 0 = Not valid
1 + 1 = 10 0–1=1 1×1=1 1 ÷ 0 = Not valid

(carry 1 to the (borrow 1 from the front
next significant bit)
significant bit

1.4.1 Binary Addition

When adding binary numbers, there are four points or steps to remember. 1 bit is carrying

over when the values added equal to 2 (102). Look for the example and understand the

addition process.

0 0 1 1
+0 +1 +1 1
+1
0 1 10 11

Carry 1 Carry 1

Carry 1 111111 Carry 1 111111

1111 11000
+ 100 + 111101

10011 1010101

Carry 1 111111 Carry 1 111111

11001 10011
+ 111101 + 1111101

1010110 10010000

CHAPTER 1 : NUMBERING SYSYTEM

You can double check the answer by convert to Decimal Number.

 Example 1

10101012 + 101101012 =

111 Carry 1

11

1010101 85
+ 181
+10110101
266
100001010

Convert to Decimal Number. Same

10101012
= (1 × 26 ) + ( 1 × 24 ) + (1 × 22 ) + (1 × 20 )
= ( 1 × 64) + ( 1 × 16) + ( 1 × 4) + ( 1 × 1)
= 64 + 16 + 4 + 1
= 8510

101101012
= (1 × 27 ) + ( 1 × 25 ) + ( 1 × 24 ) + (1 × 22 ) + (1 × 20 )
= ( 1 × 128) + ( 1 × 32) + ( 1 × 16) + ( 1 × 4) + ( 1 × 1)
= 128 + 32 + 16 + 4 + 1
= 18110

1000010102
= (1 × 28 ) + (1 × 23 ) + (1 × 21 )
= ( 1 × 256) + ( 1 × 8) + ( 1 × 2)
= 256 + 8 + 2
= 26610

10012 = 910

a. 10102 + 112 = b. 101011112 + 1111112=
Answer: 111011102
Answer: 11012
c. 111102 + 1011102 d. 1010110112 + 1000112
Answer: 1011111102
Answer: 10011002

CHAPTER 1 : NUMBERING SYSYTEM

1.4.2 Binary Subtraction

Two binary numbers subtracted each other with borrowing, when needed. Borrowing occurs
in any instance where the number that is subtracted is larger than the number it is being
subtracted from. In binary subtraction, the only case where borrowing is necessary is when
1 is subtracted from 0. When this occurs, the 0 in the borrowing column essentially
becomes "2" (changing the 0-1 into 2-1 = 1) while reducing the 1 in the column being
borrowed from by 1. Thus, each time borrowing occur, it is actually borrowing “2”. Refer to
the example below:-

0 become 2 after borrow
2–1=1

Borrow

0 1 2 12
-0 -0 10 20
-1 100
0 1 01 -1
11

 Example 1  Example 2

0200 1200
1011 02000
- 100 10011
- 110
111
1101

 Example 3  Example 4

21200 200
0 0 20 0 0202000
110011 1010110
- 11110 - 101010

10101 101100

CHAPTER 1 : NUMBERING SYSYTEM

a. 10102 - 112 = Answer: 1112 c. 10100002 - 111112=
b. 101002 - 112 = Answer: 100012 Answer: 1100012

d. 101011112 - 1111112=
Answer: 11100002

1.4.3 Binary Multiplication

Binary multiplication used value of 0 and 1, and the results must be added. Note that in each
subsequent row, placeholder 0's need to be added, and the value shifted to the left, just like
in decimal multiplication. Refer to the example below:-

0 1 10 100
×1 ×1 ×1 × 10

0 1 10 000
+ 1000

1000

 Example 1  Example 2  Example 3

110110 100110 111110
× 11 × 10 × 101

110110 000000 111110
+ 1101100 + 1001100 0000000
+ 11111010
10100010 1001100 100110110

a. 10102 × 112 = Answer: 111102 c. 10100002 × 1012=
b. 101002 × 102 = Answer: 1010002 Answer: 1100100002

d. 111112 × 1112=
Answer: 110110012

CHAPTER 1 : NUMBERING SYSYTEM

1.4.4 Octal Addition

Follow 3 simple tips to perform octal addition: -
i. Add one column at a time, start from right hand side.
ii. If the total/result of addition is less than 8, write the answer in that column.

iii. Digit used in Octal is 0 – 7. Thus, if the total/result of addition is 8,
or more than 8, subtract the result from that column with 8,
write the remaining at that column, carry 1 to the front column.

 Example 1  Example 2  Example 3
Add 4448 and 448 Add 2728 and 418 Add 278 and 648

Carry 1 Carry 1 Carry 1

11 1 11

444 272 27
+ 44 + 41 + 64

510 333 113

4448 + 448 = 5108 2728 + 418 = 3338 278 + 648 = 1138

a. 218 + 648 = Answer: 1058 c. 1578 + 308 =
b. 778 + 118 = Answer: 1108 Answer: 2078

d. 4078 + 718 =
Answer: 5008

CHAPTER 1 : NUMBERING SYSYTEM

1.4.5 Octal Subtraction

Follow 3 simple tips to perform octal subtraction:-
i. Subtract one column at a time, start from right hand side.
ii. Similar to binary numbering system subtraction, when the value is not enough to
be subtract, borrow 1 from left hand side.
iii. However, the value borrowed is 8, instead of 2 in the binary numbering system.

 Example 1  Example 2  Example 3
Substract Substract Substract
Add 2778 and 768 2628 and 718 Add 3338 and 768

Borrow Borrow Borrow

277 1 8+6 8+2
- 76 2 2 3+8
262
201 - 71 333
2778 - 768 = 2018 - 76
171
235
2628 - 718 = 1718
3338 - 768 = 2358

a. 718 - 648 = Answer: 58 c. 1578 - 678 =
b. 778 - 178 = Answer: 608 Answer: 708

d. 4078 - 718 =
Answer: 3168

CHAPTER 1 : NUMBERING SYSYTEM

1.4.6 Hexadecimal Addition

Follow 4 simple tips to perform hexadecimal addition:-
i. Add one column at a time, start from right hand side.
ii. If the total/result of addition is less than 16, write the answer in that column.

iii. Digit used in hexadecimal is 0 – 9, A - F. Thus, convert from A – F to 10 – 15 is
needed during the operation; while convert from 10 – 15 to A – F is needed for the
final answer.

iv. If the value is 16 or larger, carry 1 to the left side column.

 Example 1  Example 2  Example 3
Add 4A116 and 4416 Add 27216 and 9916 Add 27916 and A816

Carry 1 Carry 1

4 10 1 1 11
+ 44
272 279
4 14 5 + 99 + 10 8

4A116 + 4416 = 4E516 3 0 11 321

27216 + 9916 = 30B16 27916 + A816 = 32116

a. C116 + 6416 = c. 15716 + 3A16 =
Answer:19116
Answer: 12516
d. 4E716 + 7116 =
b. 7716 + EE16 = Answer: 55816

Answer: 16516

CHAPTER 1 : NUMBERING SYSYTEM

1.4.7 Hexadecimal Subtraction

Follow 3 simple tips to perform hexadecimal subtraction:-
i. Subtract one column at a time, start from right hand side.
ii. Digit used in hexadecimal is 0 – 9, A - F. Thus, convert from A – F to 10 – 15 is
needed during the operation; while convert from 10 – 15 to A – F is needed for
the final answer.
iii. When the value is not enough to be subtract, borrow 1 from left hand side.
The value borrowed is 16.

 Example 1  Example 2  Example 3
Add 2A416 and E416 Add 28216 and 7F16 Add 9B16 and 6416
Borrow
Borrow Borrow
9 11
1 10+ 7 16 - 64
16 +2
37
2 10 4 282 9B16 + 6416 = 3716
- 14 4 - 7 15

1 12 0 203

2A416 + E416 = 1C016 28216 + 7F16 = 20316

a. B116 - 6416 = Answer: 4D16 c. 15716 - 3916 =
b. 7716 - 6E16 = Answer: 916 Answer: 11E16

d. 90716 - F116 =
Answer: 81616

CHAPTER 1 : NUMBERING SYSYTEM

Reference :

Mata-Toledo, R. A. (2020). Numbering systems. AccessScience. Retrieved February 16, 2021, from
https://doi.org/10.1036/1097-8542.461500

Studypad Inc. (2020). Number system. Retrieved February 16, 2021, from
https://www.splashlearn.com/math-vocabulary/number-sense/number-system

IncludeHelp.com. (2020). Computer number systems and its types. Retrieved February 16, 2021,
from https://www.includehelp.com/computer-number-systems.aspx

Tutorialspoint.com. (2020). Computer number systems and its types. Retrieved February 16, 2021,
https://www.tutorialspoint.com/how-to-convert-binary-to-octal

Electrical4U. (2020). Binary Arithmetic Operations (How To Do The Basics). Retrieved February
16, 2021, https://www.electrical4u.com/binary-arithmetic/

Calculator.net. (2020). Binary calculator. Retrieved February 16, 2021,
https://www.calculator.net/binary-calculator.html

Jabatan Matematik, Sains & Komputer (JMSK), Politeknik Balik Pulau. (2018). Mathematical
Computing for Polytechnic’s Student. Jabatan Matematik, Sains & Komputer (JMSK), Politeknik
Balik Pulau.

CHAPTER 1 : NUMBERING SYSYTEM

QUESTION 1

1 (a) Write the following data in terms of nibbles. [2 marks]
i. 12 bits [2 marks]
ii. 2 words

1 (b) Convert the following numbers in hexadecimal: [3 marks]
i. 11111010110000112 [3 marks]
ii. 3558

1 (c ) Solve the following arithmetic operations and provide your answers in binary form:

i. 2010 + A216 – 10112 [5 marks]
ii. 1102 – 58 + 2010 + C16 [7 marks]

iii. 10012 × 1012 [3 marks]

Answer: 1 (a) (ii) 8 nibbles
1 (a) (i) 3 nibbles

1 (b) (i) FAC316 1 (b) (ii) ED16 1 (c) (iii) 1011012
1 (c) (i) 101010112 1 (c) (ii) 1000012

QUESTION 2 (Sesi Jun 2017) [2 marks]
2 (a) Convert the following: [2 marks]
[2 marks]
i. 1110 00112 to decimal [2 marks]
ii. 628 to binary. [2 marks]
iii. 4448 to hexadecimal.
iv. 201710 to Octal [5 marks]
v. 3310 to Binary [5 marks]
[5 marks]
2 (b) Calculate the following :
2 (a) (iii) 12416
i. 11012 + DAD116 (Give your answer in Octal)
ii. 2468 – 5910 (Give your answer in Hexadecimal). 2 (b) (iii) 10011102

iii. F16 + 112 ×258 (Give your answer in Binary)

Answer: 2 (a) (ii) 110 0102
2 (a) (i) 22710 2 (a) (v) 1000012
2 (b) (ii) 6B16
2 (a) (iv) 37418

2 (b) (i) 1553368

CHAPTER 1 : NUMBERING SYSYTEM

QUESTION 3 [6 marks]

3(a) i) Describe THREE (3) set data organization. [2 marks]
ii) Convert the following: [2 marks]
a. 1111100000110112 to decimal.
b. 301810 to Octal.

3(b) i) AD816 + 173C16 (give your answer in binary form). [5 marks]
ii) 1011000112 – 1001102 (Give your answer in Octal form) [5 marks]
[5 marks]
iii) 10011001112 × 1112 (Give your answer in Hexadecimal form)

Answer:
3 (a) (i)

Bit ~ A single binary digit ( 0 or 1)

Nibble ~ A group of 4 bits together is called nibble.

Byte ~ A group of 8 bits together is called nibble.

3 (a) (ii) a. 3177110 3 (a) (ii) b. 57128

3 (b) (i) 1000 10000 101002 3 (b) (ii) 4758 3 (b) (iii) 10D116

QUESTION 4 [2 marks]
4(a) i) Write 8 bytes of data in terms of nibbles. [3 marks]
[5 marks]
ii) Convert to decimal number for 60118.
iii) Find the solution of 19A716 in terms of octal number.

Answer: 4 (a) (ii) 308110 4 (a) (iii) 146478
4 (a) (i) 16 nibbles


Click to View FlipBook Version