What is the range of denary numbers that can be represented using 8-bit two’s complement binary integers?

In the two's complement notation - the first bit is used to display whether a number is positive or negative. This leaves us with 7 bits to work with to signify the magnitude(size of the number). To calculate the largest number that the binary can represent, we can use already established formula - 2^n-1 - where 'n' - is the amount of bits that the number is being represented by. 2^7-1 = 127. If we turn this number negative by flipping the bits (switching 0s to 1s and 1s to 0s) and then adding 1. We would then get 1000 0001. We can see that the magnitude section of the binary number is only 1, whilst it is representing -127. This means that there is even larger negative number that can be displayed, -128 which would be represented as 1000 0000 Another way to see this, is if we use -127 and add -1, which in binary would be 1000 0001 + 1111 1111 = 1000 0000. In conclusion, the range of the numbers that could be represented by the two's complement is -128 to 127. Which can be calculated as -(2^(N-1)) to 2^(N-1)-1 where N is the amount of bits that the two's complement has.

Answered by Juris B. Computing tutor

13684 Views

See similar Computing A Level tutors

Related Computing A Level answers

All answers ▸

In Python, write a recursive function that returns the first n Fibonacci numbers.


What are firewalls? Explain and discuss three methods they employ to secure a network. [8]


What is an OOP (Object Oriented Programming) language?


Why indentation is important in Python and what is the scope of a global variable?


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–2025

Terms & Conditions|Privacy Policy
Cookie Preferences