Binary Math
Digital Circuits
What is the one’s complement of a binary number? If you had to describe this principle to someone who just learned what binary numbers are, what would you say?
Determine the one’s complement for the following binary numbers:
 10001010_{2}
 11010111_{2}
 11110011_{2}
 11111111_{2}
 11111_{2}
 00000000_{2}
 00000_{2}
Determine the two’s complement of the binary number 01100101_{2}. Explain how you did the conversion, step by step.
Next, determine the two’s complement representation of the quantity five for a digital system where all numbers are represented by four bits, and also for a digital system where all numbers are represented by eight bits (one byte). Identify the difference that “word length” (the number of bits allocated to represent quantities in a particular digital system) makes in determining the two’s complement of any number.
In a computer system that represents all integer quantities using two’s complement form, the most significant bit has a negative placeweight. For an eightbit system, the place weights are as follows:

Given this placeweighting, convert the following eightbit two’s complement binary numbers into decimal form:
 01000101_{2} =
 01110000_{2} =
 11000001_{2} =
 10010111_{2} =
 01010101_{2} =
 10101010_{2} =
 01100101_{2} =
In an eightbit digital system, where all numbers are represented in two’s complement form, what is the largest (most positive) quantity that may be represented with those eight bits? What is the smallest (most negative) quantity that may be represented? Express your answers in both binary (two’s complement) and decimal form.
Two’s complement notation really shows its value in binary addition, where positive and negative quantities may be handled with equal ease. Add the following bytelong (8 bit) two’s complement numbers together, and then convert all binary quantities into decimal form to verify the accuracy of the addition:

Published under the terms and conditions of the Creative Commons Attribution License