You are on page 1of 25

University Requirement Courses

For All Programs


Computer Skills (CSE011) : (Lec12: Hexadecimal number system)

Date : 25 / 05 /2023
Computer Number Systems
Some important number systems are as follows:

Decimal number system


Binary number system
Octal number system
Hexadecimal number system
Hexadecimal number system

It is a combination of ten numbers, 0 through 9, and a


choice of six letters of the alphabet, which also
treated as numbers. It uses a base or radix of 16 and
the place values are the powers of 16.

It has a base of eight: 0, 1, 2, 3, 4, 5, 6,7, 8, 9, A, B, C,


D, E and F.
Octal value 3-Bit Binary

0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111
Decimal Hexadecimal 4-Bit Binary
number value
8 4 2 1

0 0 0000
1 1 0001
2 2 0010
3 3 0011
4 4 0100
5 5 0101
6 6 0110
7 7 0111
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
Binary to hexadecimal conversion

When converting binary to hexadecimal equivalents,


the binary number if first partitioned into 4-bit,
starting on the right, and then replaced by its
hexadecimal equivalent.
Decimal to hexadecimal conversion

 One way to perform a decimal to hexadecimal conversion is


to go to decimal to binary and then to hexadecimal.
Another is a direct conversion called the remainder method.
By this method, the decimal number and each successive quotient
is divided by 16 noting the remainders.

 NOTE: Remainders greater than 9 have to be changed to its


equivalent hexadecimal digit.
Hexadecimal to decimal conversion

To convert from hexadecimal to decimal,


multiply each digit by its positional value and
then obtain the sum.
Hexadecimal to binary conversion

The conversion from hexadecimal to binary is a simple


Procedure and easily done by replacing each hexadecimal
digit by its 4-bit equivalent.
Hexadecimal to Octal conversion

Convert 7D.B16 to octal number?

0111 1101.1011

01 111 101.101 1

001 111 101.101 100

1 7 5.5 4

7D.B16 = 175.548
Binary Addition

Binary addition is like the decimal addition,


except that it carries on a value of 2 instead of a value of 10.

Therefore in binary:
0+0=0
0+1=1
1+0=1
1 + 1 = 10 (which is 0 carry 1)
Binary Addition

Example: 100101 + 10101 = ………

Solution:

0+0=0
0+1=1
1+0=1
1 + 1 = 10 (which is 0 carry 1)
Binary Subtraction

The rules of binary subtraction are as follows:

0-0=0
1-0=1
1-1=0
0 - 1 = 1 with a borrow of 1
Binary Subtraction
Example: 101100 - 11010 = ………

Solution:

0-0=0
1-0=1
1-1=0
0 - 1 = 1 with a borrow of 1
Questions?

You might also like