Manual 2
Manual 2
Lab 2
OBJECTIVES
NUMBER SYSTEM
Number systems are the technique to represent numbers in the computer system
architecture, every value that you are saving or getting into/from computer memory has a
defined number system.
1
Applications of ICT Lab
Lab 2
CONVERSIONS
DECIMAL TO OTHER
1. DECIMAL TO BINARY
To convert Number system from Decimal Number System to Any Other Base is quite easy; you
have to follow just two steps:
a) Divide the Number (Decimal Number) by the base of target base system (in which you want
to convert the number: Binary (2), octal (8) and Hexadecimal (16)).
b) Write the remainder from step 1 as a Least Signification Bit (LSB) to Step last as a Most
Significant Bit (MSB).
Binary Number is
(11000000111001)2
2
Applications of ICT Lab
Lab 2
2. DECIMAL TO OCTAL
Octal Number is
(30071)8
3. DECIMAL TO HEXADECIMAL
Hexadecimal Number is
(3039)16
Example 2
Hexadecimal Number is
Decimal Number is: (725)10
(2D5)16
Convert
10, 11, 12, 13, 14, 15
to its
equivalent... A,
B, C, D, E, F
BINARY TO OTHER
Multiply the digit with 2(with place value exponent). Eventually add all the
multiplication becomes the Decimal number.
1. BINARY TO DECIMAL
3
Applications of ICT Lab
Lab 2
2. BINARY TO OCTAL
An easy way to convert from binary to octal is to group binary digits into sets of three,
starting with the least significant (rightmost) digits.
Octal: 0 1 2 3 4 5 6 7
3. BINARY TO HEXADECIMAL
An equally easy way to convert from binary to hexadecimal is to group binary digits into
sets of four, starting with the least significant (rightmost) digits.
OCTAL TO OTHER
1. OCTAL TO BINARY
Converting from octal to binary is as easy as converting from binary to octal. Simply
look up each octal digit to obtain the equivalent group of three binary digits.
Octal: 0 1 2 3 4 5 6 7
Binary: 000 001 010 011 100 101 110 111
Octal = 3 4 5
4
Applications of ICT Lab
Lab 2
Binary = 011 100 101 = 011100101 binary
2. OCTAL TO HEXADECIMAL
When converting from octal to hexadecimal, it is often easier to first convert the octal
number into binary and then from binary into hexadecimal. For example, to convert 345
octal into hex:
Octal = 3 4 5
Drop any leading zeros or pad with leading zeros to get groups of four binary digits
(bits): Binary 011100101 = 11100101
Hexadecimal: 0 1 2 3 4 5 6 7
Hexadecimal: 8 9 A B C D E F
Hexadecimal = E 5 = E5 hex
Therefore, through a two-step conversion process, octal 345 equals binary 011100101
equals hexadecimal E5.
3. OCTAL TO DECIMAL
5
Applications of ICT Lab
Lab 2
decimal (345)8 = (229)10
HEXADECIMAL TO OTHER
1. HEXADECIMAL TO BINARY
Hexadecimal: 0 1 2 3 4 5 6 7
Binary: 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal: 8 9 A B C D E F
Binary: 1000 1001 1010 1011 1100 1101 1110 1111
Hexadecimal = A 2 D E
Binary = 1010 0010 1101 1110 = 1010001011011110 binary
2. HEXADECIMAL TO OCTAL
First convert Hexadecimal number to decimal and then convert into octal. OR Convert Hexadecimal
to binary and then octal.
3. HEXADECIMAL TO DECIMAL
LAB TASKS
Task 1: Decimal to others
Utilize the Windows calculator to convert a decimal number into different bases.
Utilize the Windows calculator to convert a binary number into different bases.
6
Applications of ICT Lab
Lab 2
1011110
1011
111111
Utilize the Windows calculator to convert a binary number into different bases.
Utilize the Windows calculator to convert a hexadecimal number into different bases.
Questions:
Q 1 What is the purpose of converting numbers between different bases (e.g., decimal to binary or
hexadecimal to octal)?
7
Applications of ICT Lab
Lab 2
Q 3 How can you efficiently convert a hexadecimal number into its binary representation?
Conclusion: