How to represent a negative decimal number using 8-bit binary two's complement ?

First of all we need to convert our decimal negative number into binary without taking the sign into account. Then we have to apply some rules to convert positive binary into a negative one. To do so we have to change all the 0s into 1s and all the 1s into 0s, and then we add 1 to the result of the previous step. The number we will get at the end is the number we were looking for. Example: So for example if we want to represent -15 into binary using two's complement, we convert 15 into 8 bit binary number, and we get 0000 1111. Now we have to conver 15 into -15, to do so we apply the rules mentioned above, so we replace 1s with 0s and 0s with 1s and we get 1111 0000 and then we have to add 1, and the result we were looking for is: 1111 0000 + 1 = 1111 0001 So -15 = 1111 0001

HI
Answered by Hassan I. Computing tutor

40643 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

What is 55 using 8-bit unsigned binary?


How do you convert from binary to decimal?


In programming, some languages are compiled and others are interpreted. Define the difference between the two.


Taken from an AQA paper: A common misconception is that the Internet is the World Wide Web. Explain the differences between the Internet and the World Wide Web.


We're here to help

contact us iconContact ustelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences