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

40534 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

Describe the 4 layers of the TCP/IP model


What is immediate addressing?


Describe the difference between a CPU and a GPU with relation to processing power and ability to perform tasks.


What is the difference between RAM & ROM and the ways they are used within a computer system?


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