You are on page 1of 16

Universiti Teknologi MARA

CHAPTER 2(PART 1A)


BINARY NUMBER CONVERSION

SALEHAH HAMZAH
FACULTY OF COMPUTER AND MATHEMMATICAL SCIENCES
UITM MELAKA KAMPUS JASIN
Introduce unit in data
representation

Conversion of decimal to binary

Number
Conversion of binary to decimal
conversion
Conversion of binary fraction to
decimal
Conversion of decimal fraction to
binary
INTRODUCTION
• At the lowest level, computers are based on billions of electrical
elements that have only two states, (usually low and high voltage).
By interpreting 0 and 1, it’s easy to build circuits storing binary
numbers and doing calculations with them.
• A bit is a smallest unit in digital system which consist of bit 0 and
bit 1 only.
• A byte is a combination of 8 digit of bit 1 and bit 0.
• A word consist of either 16 bit or 32 bit which depends on
computer architecture.
REPRESENTATION OF NUMBER SYSTEM
BINARY CONVERSION

•How to read the decimal number as binary?


•Ans: You need to make conversion on the number

•Assume a decimal number to be converted is 39.


What is the binary number for decimal 39.?
•Method : use binary representation table to make
conversion
BINARY CONVERSION
a) What is the binary number for decimal 39?
Ans : Make a manual calculation to sum up
decimal 39 by locate bit 1 in binary table
128 64 32 16 8 4 2 1
0 0 1 0 0 1 1 1

Method : do multiply and sum up bit 1 only from the


table
Ans : 39 = (32 x 1) + (4 x1) + (2 x 1) + (1 x 1)
= 0010 0111
BINARY CONVERSION

b) What the binary number for decimal 78


128 64 32 16 8 4 2 1
0 1 0 0 1 1 1 0

Do Multiply and sum up bit 1 only from the table


Ans : 78 = (64 x 1) + (8 x 1) + (4 x 1) + (2 x 1)
= 0100 1110

c) Convert this number as binary : i) 113 ii) 140


BINARY CONVERSION

•How to read binary number as decimal number?


•Assume a binary number to be converted is 101
0011. What is the decimal number representation?

•Method : put binary number in binary table to


make conversion. Sum up the bit 1.
SOLUTION
•a) What is a decimal number representation of binary
number 0101 0011
128 64 32 16 8 4 2 1
0 1 0 1 0 0 1 1

•Put binary number in binary table to make


conversion. Sum up the bit 1.
•Ans : (64 x 1) + (16 x 1) + (2 x 1) + (1 x 1)
•= 83
SOLUTION
b) What is a decimal number representation of binary
number 1001 0101?
128 64 32 16 8 4 2 1
1 0 0 1 0 1 0 1
• Method : Put binary number in binary table to make conversion.
Sum up the bit 1.
• Ans = (128 x 1) + (16 x 1) + (4 x1) +(1 x1) =149
• c) What is a decimal number representation of binary number
1011 1100?
BINARY DECIMAL CONVERSION SUMMARY
Decimal Binary Decimal Binary
0 0000 10 1010
1 0001 11 1011
2 0010 12 1100
3 0011 13 1101
4 0100 14 1110
5 0101 15 1111
6 0110 16 10000
7 0111 17 10001
8 1000 18 10010
BINARY FRACTION TO DECIMAL CONVERSION

•How to read binary fraction as decimal?


•Assume a binary number to be converted is
11.1011. What is the decimal number
representation?
•Method : put binary number in binary
representation table to make conversion. Sum up
the bit 1.
BINARY FRACTION TO DECIMAL CONVERSION

a) What is a decimal number representation of binary


number 11.1011?
8 4 2 1 0.5 0.25 0.125 0.0625
0 0 1 1 1 0 1 1
Ans = (2 x 1) + (2 x 1) + (0.5 x1) +(0.125 x1) + (0.0625 x 1)
= 3.6875
c) What is a decimal number representation of binary number
1111. 0111?
Ans = 15.4375
DECIMAL FRACTION TO BINARY CONVERSION

•How to read decimal fraction as binary?


•Assume a decimal fraction to be converted is 0.6875.
What is the decimal number representation?
•Method : Do a multiplication by 2 until the result
of fraction is .0000
DECIMAL FRACTION TO BINARY CONVERSION

Assume a decimal fraction to be converted is.


0.6875.

0.6875 is 0.1011

Result fraction is .0000,


multiplication is ended
DECIMAL FRACTION TO BINARY CONVERSION

a) Convert 0.8125 as binary fraction. Show your


work.
Answer = 0.1101
b) Convert 0.875 as binary fraction. Show your
work.
Answer = 0.111

You might also like