0% found this document useful (0 votes)
14 views1 page

Binary and 2's Complement Conversions

Uploaded by

geethagini
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Binary and 2's Complement Conversions

Uploaded by

geethagini
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Convert the following values of into binary


a. 4728
b. 65348
2. Convert the following decimal values to 8-bit 2's complement representation
a. -92
b. -36
3. Perform the following conversions.
a. 11000112 converts into a decimal number system
b. 10111112 converts into a decimal number system
4. Convert the following decimal values to a 12-bit 2's complement representation.
a. -189
b. -74
5. Convert the following decimal values to a 16-bit 2's complement representation
a. -2342
b. 234
6. In binary system each number and its sign are represented by using only these two digits 0
and 1. As the negative and positive signs cannot be written directly in binary system. The
alternative method to represent negative and positive numbers is the 2’s complement
method. It has an interesting property that the binary arithmetic operation can be performed
easily on signed or unsigned numbers. Compute the following binary arithmetic operations
using 2’s complement method. Show all the steps clearly.
a. Sum of -30 and 17
b. Sum of -42 and -15
c. Sum of -13 and -16
d. Multiplication of -8 by 6
e. Multiplication of -11 by -9

Common questions

Powered by AI

To add -30 and 17 using 2's complement, convert -30 to 2's complement (first real binary: 00011110, invert: 11100001, plus 1: 11100010) and 17 to binary (00010001). Adding 11100010 and 00010001 results in 11110011, which inverts to 00001100 (12) and add 1 to become 00001101, or -13 in decimal .

To convert 1011111 to decimal, calculate the weighted sum of bits: (1 * 2^6) + (0 * 2^5) + (1 * 2^4) + (1 * 2^3) + (1 * 2^2) + (1 * 2^1) + (1 * 2^0) = 64 + 0 + 16 + 8 + 4 + 2 + 1 = 95 .

In binary, negative numbers are represented using the 2's complement method, which involves inverting all bits of the number's binary equivalent (creating the 1's complement) and then adding one to the resulting least significant bit. This approach effectively allows signed arithmetic, where the most significant bit represents the sign (0 for positive, 1 for negative), and ensures that binary arithmetic operations can be performed without needing separate logic for sign .

To convert the decimal number 4728 into binary, start by finding the largest power of 2 that fits into it. The process is: 4728 divided by 4096 (2^12): quotient = 1, remainder = 632; 632 divided by 512 (2^9): quotient = 1, remainder = 120; 120 divided by 64 (2^6): quotient = 1, remainder = 56; 56 divided by 32 (2^5): quotient = 1, remainder = 24; 24 divided by 16 (2^4): quotient = 1, remainder = 8; 8 divided by 8 (2^3): quotient = 1, remainder = 0. Therefore, 4728 = 1001001111000 in binary .

Challenges in binary multiplication using the 2's complement method include handling overflow and ensuring bit-width consistency across operations. Advantages include the ability to perform arithmetic without additional hardware or operations for determining the sign, enabling both signed and unsigned arithmetic seamlessly .

To convert -189 to a 12-bit 2’s complement: convert 189 to binary (10111101), then apply 1’s complement by inverting the bits (01000010), and add 1 to get 01000011. Finally, fill to 12 bits by adding four leading 1s, resulting in 111101111111 .

The binary number 1100011 can be converted into decimal by calculating the sum of powers of 2 for each '1' bit from right to left: (1 * 2^6) + (1 * 2^5) + (0 * 2^4) + (0 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0) = 64 + 32 + 0 + 0 + 0 + 2 + 1 = 99 .

The 8-bit 2's complement of -36 starts by writing the binary representation of 36, which is 00100100. Next, invert all bits to get 11011011, and then add 1 to the least significant bit, resulting in 11011100 .

Convert -8 to binary 2’s complement (00001000, invert: 11110111, add 1: 11111000) and 6 to binary (00000110). Using binary multiplication (shifting and addition akin to decimal multiplication but in binary), the signs determine the end result's sign (negative). Multiplying these results in 1111100000, which translates back to -48 in decimal by first recognizing it's in 2's complement of a 10-bit number .

The 2's complement system simplifies addition and subtraction by using the same algorithm for both positive and negative numbers. The most significant bit indicates the sign, and the same arithmetic logic unit can be used for operations without separate logic for different signs, ensuring consistency and reducing complexity in computation .

You might also like