0% found this document useful (0 votes)
81 views

Binary PDF

This document discusses binary numbers and their representations. It provides examples of how to convert between binary and other bases like base 8. It also explains how signed and unsigned binary numbers are represented in n-bit systems. Specifically, it notes that the largest unsigned n-bit number is all 1s and the smallest is all 0s. For signed n-bit numbers using two's complement, the largest is 0 followed by all 1s and the smallest is 1 followed by all 0s, representing 2n-1 - 1 and -2n-1 respectively. It also gives an example of finding the two's complement representation of a negative number.

Uploaded by

cr4ck3d0ut
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Binary PDF

This document discusses binary numbers and their representations. It provides examples of how to convert between binary and other bases like base 8. It also explains how signed and unsigned binary numbers are represented in n-bit systems. Specifically, it notes that the largest unsigned n-bit number is all 1s and the smallest is all 0s. For signed n-bit numbers using two's complement, the largest is 0 followed by all 1s and the smallest is 1 followed by all 0s, representing 2n-1 - 1 and -2n-1 respectively. It also gives an example of finding the two's complement representation of a negative number.

Uploaded by

cr4ck3d0ut
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

110 Facts About Binary Numbers

1. If the last digit of a binary number is 1, the number is odd; if it’s 0, the number is
even.
Ex: 1101 represents an odd number (13); 10010 represents an even number (18).

2. To convert a binary number to base 2k , split it into groups of k digits (adding leading
0s if necessary), then convert each group to base 2k .
Ex: Convert the number 1001011111 to base 8.
First, note that 8 = 23 , so we should split the number into groups of 3 digits:

001 001 011 111

Note that we added two leading 0s to make the number of digits a multiple of 3. Next,
we convert each group of 3 digits to base 8:

001 001 011 111


1 1 3 7

Thus, the number in base 8 is 1137.

3. In a base-n representation of a number, no digit exceeds n − 1.


Ex: Every digit of a base 3 number must be 0, 1, or 2.

4. In an n-bit, unsigned binary system, the largest number that can be represented is all
1s and the smallest number is all 0s. These numbers represent 2n −1 and 0, respectively.
Ex: In an 8-bit, unsigned binary system, the largest number that can be represented
is 11111111 = 28 − 1 = 255, and the smallest is 00000000 = 0.

5. In an n-bit, signed, two’s complement binary system, the largest number that can be
represented is a 0 followed by all 1s, and the smallest is a 1 followed by all 0s. These
numbers represent 2n−1 − 1 and −2n−1 , respectively.

1
Ex: In an 8-bit, signed, two’s complement binary system, the largest number that can
be represented is 01111111 = 27 −1 = 127, and the smallest is 10000000 = −27 = −128.

6. In an n-bit, signed, two’s complement binary system, a negative number x is the same
as the positive number 2n−1 + x, except the leading (leftmost) bit is 1 instead of 0.
Therefore, you can find the two’s complement representation of x by adding 2n−1 ,
finding the n-bit unsigned representation, and changing the first bit to a 1.
Ex: In an 8-bit, signed binary system, find the representation of −54.
First, we find the representation of 27 + −54 = 128 − 54 = 124; it is 01111100. Thus,
−54 is 11111100.
128 : 0 1 1 1 1 1 0 0
−54 : 1 1 1 1 1 1 0 0

(Image taken from XKCD)

You might also like