Chapter 1 - Understand Numbering System
Chapter 1 - Understand Numbering System
Chapter 1 - Understand Numbering System
DECIMAL Base-10. Decimal number consisting 10 numbers we use in everyday life (0-9)
Base-2. Binary describes a numbering scheme in which there are only two
BINARY
possible values for each digit: 0 and 1.
DATA IN BITS
Nibble 4 bits
Bytes 8 bits
Words 16 bits
Double words 32 bits
*You need to convert data into bits before proceed to other data.
BITS
o A single numerical unit in the binary number system.
o the basic and physical unit of information in computing and digital communications.
o Bit is short form for BInary digit.
o Computer communicate in binary language which is denoted by 0s and 1s
o can also be interpreted as logical values (true/false, yes/no), algebraic signs (+/−), or activation states
(on/off).
o The symbol for binary digit is either simply bit or lowercase b
1
NIBBLES
o Four bits in series, or half an 8-bit byte.
o A nibble is used to represent hexadecimal in binary.
BYTE/OCTET
o A series of eight bits.
o Since a byte is not eight bits in all computer systems, octet provides a non-ambiguous term.
o 1 character occupies 8 bits of memory.
o Can represent a character or a special symbol in a character code.
o The unit symbol for the byte was designated as the upper-case letter B
WORDS
o A defined and specific number of digits grouped together.
o A collection of characters which is 16 bits in size.
DOUBLE WORDS
o Twice the length of a single computer word.
o A double word is typically 32 bits long.
EXAMPLES:
= 3 nibbles = 8 nibbles
2
TRY NOW:
CONVERSION SYSTEM
BINARY TO DECIMAL
Since binary is a base-2 system, each digit represents an increasing power of 2, with the rightmost digit
representing 20, the next representing 21, then 22, and so on. To determine the decimal representation of a
binary number simply take the sum of the products of the binary digits and the powers of 2 which they
represent.
EXAMPLES:
1011002 011102
= (1 × 25 ) + (0 × 24 ) + (1 × 23 ) + = (1 × 23 ) + (1 × 22 ) + (1 × 21 ) +
(1 × 22 ) + (0 × 21 ) + (0 × 20 ) (0 × 20 )
= 32 + 0 + 8 + 4 + 0 + 0 = 8 + 4 + 2 + 0
= 441010 = 1410
3
TRY NOW:
OCTAL TO DECIMAL
EXAMPLES:
278 125708
= (2 × 81 ) + (7 × 80 ) = (1 x 84) + (2 x 83) + (5 x 82) + (7 x 81) +
= 16 + 7 (0 x 80)
= 23 = 4096 + 1024 + 320 + 56 + 0
= 549610
3. John offers to give you 478 cookies, and Jane offers to give you 4310 cookies. Whose offer do you
take?
For 478 ,
= (4x81) + (7x80 )
= (4x8) + (7x1)
= 32 + 7
= 3910
4
TRY NOW:
HEXADECIMAL TO DECIMAL
Hexadecimal numbers uses digits from 0-15. Since we are working with base-16, we have 16 digits. We've
run out of digits, but we still need six more. Continue the sequence with alphabet A to F.
5
EXAMPLES:
= 10646210
TRY NOW:
6
DECIMAL TO BINARY
Write the decimal number as the dividend inside an upside-down "long division" symbol. Write the base of
the destination system (in our case, "2" for binary) as the divisor outside the curve of the division symbol.
EXAMPLES:
1. Convert 15610 to base-2. 2. Convert 3310 to base-2.
2 156 2 33
2 78 R=0 2 16 R=1
2 39 R=0 2 8 R=0
2 19 R=1 2 4 R=0
2 9 R=1 2 2 R=0
2 4 R=1 2 1 R=0
2 2 R=0 - R=1
2 1 R=0
- R=1
TRY NOW:
1. Convert 9710 to base-2. 2. Convert 1610 to binary number.
7
DECIMAL TO OCTAL
EXAMPLES:
8 59 8 2418
8 7 R=3 8 302 R=2
- R=7 8 37 R=6
8 4 R=5
- R=4
TRY NOW:
8
DECIMAL TO HEXADECIMAL
EXAMPLES:
16 3132 16 99
16 195 R=12 16 6 R=3
16 12 R=3 - R=6
- R=12
TRY NOW:
9
We need to do all the procedures (multiplication and division) when converting binary, octal, and
hexadecimal into one another. Decimal is your pit-stop.
BINARY TO OCTAL
Convert 001100011002 to octal number.
METHOD 1
binary to decimal
= (1x28) + (1x27) + (0x26) + (0x25) + (0x24) + (1x23) + (1x22) + (0x21) + (0x20)
= 256 + 128 + 0 + 0 + 0 + 8 + 4 + 0 + 0
= 39610
decimal to binary
8 396
8 49 R=4
8 6 R=1
- R=6
METHOD 2
using binary table for octal.
Step 1: Split digits into 3 per group, start from the back.
000 110 001 100
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
10
TRY NOW:
11
BINARY TO HEXADECIMAL
Convert 010101112 to a hexadecimal number.
METHOD 1
binary to decimal
= (0x27) + (1x26) + (0x25) + (1x24) + (0x23) + (1x22) + (1x21) + (1x20)
= 0 + 64 + 0 + 16 + 0 + 4 + 2+ 1
= 8710
decimal to hexadecimal
16 87
16 5 R=7
- R=5
METHOD 2
using binary table for hexadecimal.
Step 1: Split digits into 4 per group, start from the back.
0101 0111
12
TRY NOW:
13
OCTAL TO BINARY
Convert 348 to binary number.
METHOD 1
octal to decimal
= (3x81) + (4x80)
= 24 + 4
= 2810
decimal to hexadecimal
2 28
2 14 R=0
2 7 R=0
2 3 R=1
2 1 R=1
- R=1
METHOD 2
using binary table for octal.
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7
Step 3: Find the correct value for the digit. State the answer.
Therefore, the answer is 0111002 = 111002.
14
TRY NOW:
15
OCTAL TO HEXADECIMAL
METHOD 1
METHOD 2
Step 1: Split into single digit. Step 5: Form the binary table for hexadecimal.
5 0 1
0000 0
Step 2: Form the binary table for octal. 0001 1
0010 2
000 0 0011 3
001 1 0100 4
010 2 0101 5
0110 6
011 3
0111 7
100 4
1000 8
101 5 1001 9
110 6 1010 A
111 7 1011 B
1100 C
Step 3: Find the correct value for the digit. State 1101 D
the answer. 1110 E
Therefore, the answer is 1010000012 . 1111 F
Step 4: Split digit into 4 per group, from the back. Step 6: State the answer.
0001 0100 0001 Therefore, the answer is 14116 .
16
TRY NOW:
17
HEXADECIMAL TO BINARY
Convert 5216 to a binary number.
METHOD 1
hexadecimal to decimal
= (5x161) + (2x160)
= 80 + 2
= 8210
decimal to binary
2 82
2 41 R=0
2 20 R=1
2 10 R=0
2 5 R=0
2 2 R=1
2 1 R=0
- R=1
METHOD 2
using binary table for hexadecimal.
0000 0
Step 1: Split digits into 4 per group, start from the back. 0001 1
5 2 0010 2
0011 3
Step 2: Form the binary table for hexadecimal.
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
Step 3: State the answer. 1110 E
Therefore, the answer is 010100102 = 10100102. 1111 F
18
TRY NOW:
19
HEXADECIMAL TO OCTAL
Convert 2B7116 to octal number.
METHOD 2
Step 3: Find the correct value for the digit. State
Step 1: Split into single digit. the answer.
2 B 7 1 Therefore, the answer is 00101011011100012 .
20
TRY NOW:
i. 00011010 + 00001100
0 0 0 1 1 0 1 0
+ 0 0 0 0 1 1 0 0
0 0 1 0 0 1 1 0
i. 00011010 + 00001100
0 0 0 1 0 0 1 1
+ 0 0 1 1 1 1 1 0
0 1 0 1 0 0 0 1
i. 1110110 + 1010111
1 1 1 0 1 1 0
+ 1 0 1 0 1 1 1
1 1 0 0 1 1 0 1
TRY NOW:
i. 00100101 - 00010001
00100101
- 00010001
00010100
0 0 1 1 0 0 1 1
- 0 0 0 1 0 1 1 0
0 0 0 1 1 1 0 1
1 1 1 0 1 1 0
- 1 0 1 0 1 1 1
0 0 1 1 1 1 1
TRY NOW:
i. 00101001 × 00000110
0 0 1 0 1 0 0 1
x 0 0 0 0 0 1 1 0
0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 1
0 0 1 0 1 0 0 1
0 0 1 1 1 1 0 1 1 0
0 0 0 1 0 1 1 1
x 0 0 0 0 0 0 1 1
0 0 0 1 0 1 1 1
0 0 0 1 0 1 1 1
0 0 1 0 0 0 1 0 1
TRY NOW:
DECIMAL TO OCTAL
DECIMAL OTHER TYPES DIVIDED BY THEIR BASE
DIVIDE BY 8
OCTAL TO DECIMAL
OTHER TYPES DECIMAL MULTIPLIED BY THEIR BASE
MULTIPLY BY 8
MODE MODE BASE CHOOSE TYPES OF TYPE YOUR NUMBER = CHOOSE TYPES OF
NUMBER (GREEN COLOUR) NUMBER THAT YOU WANT
TO CONVERT (GREEN
COLOUR)