Describe two's complement.

Two's complement is improvement on one's complement.
To get a negative number in One's complement, one has to invert all numbers (turn 1 to 0, and 0 to 1), for two's complement is the same but add 1 (e.g. in 4 bit, 0001).
For example to get a negative -5 in 4 bit:Positive 4: 01002Invert positive 4: 10112, this is negative -4 in one's complement.Add 0001 to inverted positive 4: 1100
A simple way to read the two's complements binary number: usually, from left most to right we see each bit as [8, 4, 2, 1], but for two's complement we (humans) can read it as [-8, 4, 2, 1], so 1100 would be -8 +4, which is -4.
Though, two's complement is more common for two reasons.In one's complement there are two representations for 0 (in 4 bit it would be 0000 and 1111).When adding a positive and a negative number you also need to add 1 (e.g. in 4 bit, 0001) after the operation.

Answered by Lukas P. Computing tutor

1308 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

Discuss the differences between operating systems designed for desktop computers and embedded systems.


What is the denary equivalent of the hexadecimal number A7?


Convert the hexadecimal '3E', which represents a 2's compliment binary number, in decimal.


What are higher order functions in functional programming? How does the 'map' function work and why is it a higher order function?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2024

Terms & Conditions|Privacy Policy