Week2 - Set 3 (Wednesday)
Week2 - Set 3 (Wednesday)
Week2 - Set 3 (Wednesday)
Tutorial Assignment: 1
CO Mapping
Name CO1 CO2 CO3
Number System Conversion ✓ - -
In computer applications the Binary numbers are represented by only two symbols or digits, i.e. 0 and 1. The
binary numbers here are expressed in the base-2 numeral system. For example, (101)2 is a binary number.
Each digit in this system is said to be a bit. The Octal number system has base value equal to 8 and comprise
numbers 0 to 7. The Decimal number system is the number system that we use on a daily basis based on the
10 digits (0-9). The Hexadecimal number system number system has a base value equal to 16. containing
numbers from 0 to 9 and the capital letters A to F to represent its Binary or Decimal number equivalent.
Conversion of Binary to Other Number Systems
To convert a binary number to octal number then Group all the 1's and 0's in the binary number in
sets of three, starting from the far right. Add zeros to the left of the last digit if you don't have enough digits to
make a set of three. Add up the new numbers in each set of three. For example: 10101 2 is the binary number.
We can write the given binary number as: 010 101. Now as we know, in the octal number system, 010 → 2
and 101 → 5. Therefore, the required octal number is (25)8.
To convert the binary number to decimal is equal to the sum of binary digits (dn) times their power
of 2 (2n). For example: (10101)2 = 1 × 24 + 0 × 23 + 1 × 22 + 0 × 21 + 1 × 20 = 16 + 4 + 1 == (21)10.
To convert binary number to hexadecimal: Divide the binary digits into groups of four (starting
from right) for integer part and start from left for fraction part. Convert each group of four binary digits to one
hexadecimal digit. For example: 0001 0101 = (15)16.
To convert decimal to octal, the decimal number is divided by 8 and record the remainders. Once the
quotient is less than 8, we obtain the octal number by writing the remainder in reverse order. For example,
(45)10 = (55)8
The decimal to hexadecimal conversion is done similarly to the other two number systems. The base number
of hexadecimal is 16 so the number needs to be divided by 16 until the quotient is zero.
To convert hexadecimal to a binary number we need to first convert the hexadecimal number to a
decimal number to finally convert it to a binary number. For example, (100)16 is converted to decimal by
multiplying each digit with 16n-1.
(100)16 = 1 × 16(3-1) + 0 × 16(2-1) + 0 × 16(1-1)
(100)16 = 1 × 162 + 0 × 161 + 0 × 160
(100)16 = (256)10
Now, convert the decimal number (256)10 to a binary number by dividing the number by 2 until the quotient is
zero.
(100)16= (100000000)2
Questions:
1. Convert following binary representation to decimal representation ?
a) (11001)2
b) (1100100)2
2. Convert following octal representation to decimal representation ?
a) (31)8
b) (144)8
3. Convert following hexadecimal representation to decimal representation?
a) (19)16
b) (64)16