Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Binary representation of numbers is typically used for integers. Since 40.

8 is a
decimal number with a fractional part, it cannot be directly represented in binary.
Binary representation is used to represent whole numbers in base-2, where each
digit can be either 0 or 1.
• To convert the integer part of 40.8 into binary, the binary representation of
40 is 101000.
• Representing the fractional part (0.8) in binary, you can use a technique
called binary fraction conversion. You can multiply the fractional part by 2
and take the integer part of the result as the binary digit. Repeat this process
until you reach the desired precision.
For example:
0.8 * 2 = 1.6 → 1 (integer part)
0.6 * 2 = 1.2 → 1
0.2 * 2 = 0.4 → 0
0.4 * 2 = 0.8 → 0
The binary representation of the fractional part 0.8 would be 1100 (rounded to
the desired precision).
Combining the binary representation of the integer part and the fractional part,
the binary representation of 40.8 would be approximately 00101000.11001100.
To find the two's complement of a binary number, you need to follow these
steps:
Invert all the bits (change 0s to 1s and 1s to 0s).
Add 1 to the least significant bit (the rightmost bit).
Let's apply these steps to the binary number 00101000.11001100:
Step 1: Invert all the bits
Original number: 00101000.11001100
Inverted number: 11010111.00110011
Step 2: Add 1 to the least significant bit
Inverted number: 11010111.00110011
Add 1: 11010111.00110011 + 1 = 11010111.00110100
Therefore, the two's complement of 00101000.11001100 is
11010111.00110100.
EX: - 00101000.11001100 /00001010.00110011 => (40.8/10.2 use special
subtraction form or 2’s complement)
Step 1: - find the two's complement of a binary number, 00001010.00110011:
(divisor)
• Inverted number: 11110101.11001100
• Add 1 to the least significant bit
Add 1: 11110101.11001100 + 1 = 11110101.11001101
Therefore, the two's complement of 00001010.00110011 is
11110101.11001101= -10.2
Step 2: - subtract the divisor from divided (which means addition form)
0010 1000.1100 1100+ dividend
1111 0101.1100 1101= 2’s complement of divisor
0001 1110.1001 1001->1st Reminder, Q=0000 0001
Step 3: - Add 1st reminder and divisor
0001 1110.1001 1001 + → 1st reminder
1111 0101.1100 1101= → 2’s complement of divisor
0001 0100.0110 0110 →2nd reminder , Q=0000 0010
Step 4: - Add 2nd reminder and divisor,
0001 0100.0110 0110 + →2nd reminder
1111 0101.1100 1101= →2’s complement of divisor
0000 1010.0011 0011 →3rd reminder, Q=00000011
Step 4: - Add 3rd reminder and divisor
0000 1010.0011 0011+ →3rd reminder
1111 0101.1100 1101= →2’s complement of divisor
0000 0000.0000 0000 →4th reminder, Q=0000 0100 the last quotient
Ex 2: - 0.1000/0.0100=____? (Hint 0.5/0.25)

You might also like