This document discusses different numbering systems used in digital electronics and computing including binary, decimal, octal, hexadecimal, and BCD. It provides examples of converting between these systems and identifies their applications. The key points covered are binary, octal and hexadecimal representations; conversion between decimal, binary, octal and hexadecimal; one's and two's complements; and BCD representation. Tutorial problems are also included for practice converting between these different numbering systems.
Design For Accessibility: Getting it right from the start
Topic 1 Digital Technique Numbering system
1. Malaysian Institute of Aviation Technology
DIGITAL TECH (MECH)
AKD 21102
CHAPTER 1
NUMBERING SYSTEM
Revision 01 Issue02 Module 5.2 1
2. Malaysian Institute of Aviation Technology
INTRODUCTION
• In electronics, the data has to be transform from
analogue to digital
• The conversion of data is in ON state (binary 1)
and OFF state (binary 0)
• However, binary conversion has limitation when
dealing with large value.
• Therefore, the conversion can be in the form of
decimal, octal, hexadecimal
Revision 01 Issue02 Module 5.2 2
3. Malaysian Institute of Aviation Technology
CHAPTER CONTENT
1. Identifies binary, octal and hexadecimal system
2. Convert and perform calculation on decimal
and binary, octal and hexadecimal systems and
vice versa.
3. Identify BCD system.
Revision 01 Issue02 Module 5.2 3
4. Malaysian Institute of Aviation Technology
DECIMAL SYSTEM
• The conventional system
• Comprise of 10 digits from 0 to 9
• Base 10 system
• Positional value system numbering system
• Example : 15110,254110
Revision 01 Issue02 Module 5.2 4
5. Malaysian Institute of Aviation Technology
DECIMAL SYSTEM
• Example: 25410 consists of 2 HUNDREDS, 5 TENS and 4
ONE units.
• Written as : (2 X 100) + (5 X 10) + (4 X 1)
= (2 X 102) + (5 X 101) + (4 X 100)
• Digit 2 carries the MOST weight and is known as MOST
SIGNIFICANT DIGIT (MSD)
• Digit 4 carries the LEAST weight and is known as LEAST
SIGNIFICANT DIGIT (LSD)
Revision 01 Issue02 Module 5.2 5
6. Malaysian Institute of Aviation Technology
• DISADVANTAGE for usage in digital
computer example transistor due to :
-Having 10 Discrete Value Level which is
extremely difficult to operate due to:
a. Any VARIATION of POWER SUPPLY would cause error
b. Component TOLERANCE MUST be ZERO
c. Component VALUE will change with AGE
Revision 01 Issue02 Module 5.2
6
DECIMAL SYSTEM
7. Malaysian Institute of Aviation Technology
• Comprise of 2 digits (0 & 1) known as BITS
• Base 2 system. Example : 10112
• POSITIONAL value system
10112=(1X23)+(0X22)+(1X21)+(1X20)
• BINARY to DECIMAL Conversion
10112=(1X23)+(0X22)+(1X21)+(1X20)
= 8+0+2+1
= 11
sum of each bits multiplied by its particular positional value
Revision 01 Issue02 Module 5.2
7
BINARY SYSTEM
8. Malaysian Institute of Aviation Technology
• DECIMAL to BINARY Conversion
I) SUCCESSIVE POWER OF 2.
Example: 27 =16+8+2+1
=24+23+21+20
=(1x24)+(1x23)+(0X22)+(1X21)+(1X20)
=110112
ii) SUCCESSIVE divide by 2 and record any remainder
of division.
• Suitable for SMALL number
Revision 01 Issue02 Module 5.2
8
BINARY SYSTEM
9. Malaysian Institute of Aviation Technology
• Any number converted into BINARY form,
the binary numbers is known as a WORD.
• Each word is formed of a numbers of BITS
(BINARY DIGITS) and this represents the
WORD LENGTH
• Example : 34710 = 1010110112.
• So 1010110112 is a WORD. Word length is 9
because there is 9 bits
Revision 01 Issue02 Module 5.2
9
BINARY SYSTEM
10. Malaysian Institute of Aviation Technology
• Convert from binary to decimal
• Convert from decimal to binary
Revision 01 Issue02 Module 5.2
10
BINARY SYSTEM
11. Malaysian Institute of Aviation Technology
TUTORIAL
1. Convert the following binary numbers to decimal:
(a) 101012
(b) 1100112
(c) 10010012
(d) 101010112
2. Convert the following decimal numbers to binary:
(a) 25
(b) 43
(c) 65
(d) 100.
Revision 01 Issue02 Module 5.2 11
12. Malaysian Institute of Aviation Technology
• Base 8 systems
• Composed of 8 digits from 0 to 7
• OCTAL to DECIMAL conversion
Example :
2758=(2x82)+(7x81)+(5x80)
=128+56+5 = 18910
• DECIMAL to OCTAL conversion
Divide by 8 and Record any REMAINDER
of division
Revision 01 Issue02 Module 5.2
12
OCTAL SYSTEM
13. Malaysian Institute of Aviation Technology
• OCTAL to BINARY conversion
- Convert each OCTAL number into 3 bits BINARY equivalent.
• Example :
a) 6358 TO BINARY. b)
6 3 5
110 011 101
Thus, 6358= 1100111012
Revision 01 Issue02 Module 5.2
13
OCTAL SYSTEM
14. Malaysian Institute of Aviation Technology
• BINARY to OCTAL conversion
- Divide BINARY number into groups of 3 BITS starting
from LSB.
Example :
1001110112 TO OCTAL.
100 111 011
4 7 3
Thus, 1001110112=4738
• If the FINAL group of MSB does NOT have 3 BITS, ADD
enough ZERO to make up 3 BITS.
Revision 01 Issue02 Module 5.2
14
OCTAL SYSTEM
15. Malaysian Institute of Aviation Technology
TUTORIAL
1. Convert the following binary numbers to octal:
(a) 101012
(b) 1100112
(c) 10010012
(d) 101010112
2. Convert the following decimal numbers to octal:
(a) 25
(b) 43
(c) 65
(d) 100.
Revision 01 Issue02 Module 5.2 15
16. Malaysian Institute of Aviation Technology
• BASE 16.
• Composed of 16 digit Symbols
0 1 2 3 4 5 6 7 8 9 A B C D E F
• Example: 85D1B16
• HEX to DECIMAL
conversion
Example :B2F16=(11x162)+(2x161)+(15x160)
=2816+32+15
=286310
Revision 01 Issue02 Module 5.2
16
HEXADECIMAL SYSTEM
17. Malaysian Institute of Aviation Technology
HEXADECIMAL SYSTEM
• DECIMAL to HEX Conversion
Divide with 16 and take the REMAINDER of division
• HEX to BINARY Conversion
-Convert each HEX digit into
4 bits BINARY equivalent.
i.e. B2F16 TO BINARY
B 2 F
1011 0010 1111
THUS, B2F16= 1011001011112
Revision 01 Issue02 Module 5.2
17
18. Malaysian Institute of Aviation Technology
• BINARY to HEX Conversion
- Divide BINARY number into groups of 4 bits STARTING at LSB.
i.e. 1101101010012 TO HEX
1101 1010 1001
13 10 9
D A 9
Thus, 1101101010012=DA916
Revision 01 Issue02 Module 5.2
18
HEXADECIMAL SYSTEM
19. Malaysian Institute of Aviation Technology
• HEX to OCTAL Conversion and vice versa
i) Convert HEX to BINARY
ii)Convert BINARY to OCTAL
To Convert OCTAL to HEX, just REVERSE the process
Example : 3D16 convert to OCTAL
i)Convert HEX to BINARY, 3 D
0011 1101 3D16=1111012
ii)Convert BINARY to OCTAL, 111 101
7 5 1111012=758
Thus, 3D16=758
Revision 01 Issue02 Module 5.2
19
HEXADECIMAL SYSTEM
20. Malaysian Institute of Aviation Technology
TUTORIAL
1. Find the decimal equivalent of the octal number 41.
2. Find the octal equivalent of the decimal number 139.
3. Find the binary equivalent of the octal number 537.
4. Find the octal equivalent of the binary number
111001100.
5. Convert the hexadecimal number 3F to:
(a) decimal and (b) binary.
6. Convert the binary number 101111001 to
(a) octal and (b) hexadecimal.
7. Which of the following numbers is the largest?
(a) C516 (b) 110000012 (c) 3038.
Revision 01 Issue02 Module 5.2 20
21. Malaysian Institute of Aviation Technology
BCD SYSTEM
• Binary Coded Decimal
• Number represented in 4 bits binary code
• Leaving a space between each group of 4
digits
• Example :
a) 1110 to BCD is 0001 0001BCD
b) 1000 0101BCD in BCD to Decimal is 8510
Revision 01 Issue02 Module 5.2
21
22. Malaysian Institute of Aviation Technology
TUTORIAL
a) Convert from decimal to BCD
i. 94
ii. 529
iii. 2947
b) Convert from BCD to decimal
i. 0111 0000 1001BCD
ii. 0011 0110 0100BCD
Revision 01 Issue02 Module 5.2
22
23. Malaysian Institute of Aviation Technology
ONE’S COMPLIMENT
• The one’s complement of a binary number is
formed by inverting the value of each digit of the
original binary number (i.e. replacing 1s with 0s
and 0s with 1s)
• Example: the one’s complement of the binary
number 1010 is 0101.
• Similarly, the one’s complement of 01110001 is
10001110.
– Note: if you add the one’s complement of a number to
the original number the result will be all 1s,
Revision 01 Issue02 Module 5.2
23
24. Malaysian Institute of Aviation Technology
ONE’S COMPLIMENT
• The one’s complement of a binary number is formed by
inverting the value of each digit of the original binary
number (i.e. replacing 1s with 0s and 0s with 1s)
• Example: the one’s complement of the binary number
1010 is 0101.
• Similarly, the one’s complement of 01110001 is
10001110.
– Note: if you add the one’s complement of a number to the
original number the result will be all 1s,
Revision 01 Issue02 Module 5.2
24
25. Malaysian Institute of Aviation Technology
TWO’S COMPLIMENT
• Two’s complement notation is frequently used to represent negative
numbers in computer mathematics (with only one possible code for
zero—unlike one’s complement notation).
• The two’s complement of a binary number is formed by inverting the
digits of the original binary number and then adding 1 to the result.
• Example: the two’s complement of the binary number 1001 is 0111.
Similarly, the two’s complement of 01110001 is 10001111.
• When two’s complement notation is used to represent negative
numbers the most significant digit (MSD) is always a 1
Revision 01 Issue02 Module 5.2
25
26. Malaysian Institute of Aviation Technology
TUTORIAL
1. Find the one’s complement of the binary
number 100010.
2. Find the two’s complement of the binary
number 101101.
Revision 01 Issue02 Module 5.2 26