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

Answered by Hassan I. Computing tutor

36861 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

What are the benefits of Reverse Polish Notation and what is it?


Convert the base-10 number 74 into an 8-bit binary number


What do the logical operators AND, OR, XOR and NOT do?


why is the Harvard architecture is sometimes used in preference to the von Neumann architecture and give examples of each system


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