0% found this document useful (0 votes)
17 views8 pages

BinaryLab LandonSmith

The document provides information about binary and hexadecimal numbering systems. It shows how decimal numbers are represented in binary code using a table with the binary and decimal equivalents. It then demonstrates how to translate between binary, decimal, and hexadecimal numbers. Binary numbers are converted to decimal by adding the place values of 1s from right to left. Decimal numbers are converted to binary by successive subtraction and noting the remainders. Hexadecimal is converted from binary by separating into nibbles (groups of 4) and assigning numeric values to each nibble.

Uploaded by

Landon Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views8 pages

BinaryLab LandonSmith

The document provides information about binary and hexadecimal numbering systems. It shows how decimal numbers are represented in binary code using a table with the binary and decimal equivalents. It then demonstrates how to translate between binary, decimal, and hexadecimal numbers. Binary numbers are converted to decimal by adding the place values of 1s from right to left. Decimal numbers are converted to binary by successive subtraction and noting the remainders. Hexadecimal is converted from binary by separating into nibbles (groups of 4) and assigning numeric values to each nibble.

Uploaded by

Landon Smith
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Section 1

Insert a zero on a green box and one on


Binary Code
the orange box.
Decimal Binary Code
0 0 0 0 0 That’s how decimal numbers are
1 0 0 0 1 represented in binary
2 0 0 1 0
3 0 0 1 1 Example 1 decimal is represented by
4 0 1 0 0 0001
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
Spaces 4 3 2 1
Binary Base 2- 5 Binary base of two
Decimal Binary Code Binary Base 2
0 0 0 0 0 0+0+0+0=0 Starts from right to left and you
1 0 0 0 1 0+0+0+1=1 only add the one’s according to
2 0 0 1 0 0+0+2+0=2 their value.
3 0 0 1 1 0+0+2+1=3
4 0 1 0 0 0+4+0+0=4
5 0 1 0 1 0+4+0+1=5
6 0 1 1 0 0+4+2+0=6
7 0 1 1 1 0+4+2+1=7
8 1 0 0 0 8+0+0+0=8
9 1 0 0 1 8+0+0+1=9
10 1 0 1 0 8+0+2+0=10
11 1 0 1 1 8+0+2+1=11
12 1 1 0 0 8+4+0+0=12
13 1 1 0 1 8+4+0+1=13
14 1 1 1 0 8+4+2+0=14
15 1 1 1 1 8+4+2+1=15
Power 24 22 21 20
8 4 2 1
Section 2

Translate binary to decimal


27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Result of power of 2
1 0 0 0 0 1 1 1 Add the values
128 0 0 0 0 4 2 1 135

27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Result of power of 2
0 0 0 1 0 1 1 1 Add the values
0 0 0 16 0 4 2 1 23

27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Result of power of 2
0 1 0 1 0 1 0 1 Add the values
0 64 0 16 0 4 0 1 85

27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Result of power of 2
1 1 1 0 0 1 0 0 Add the values
128 64 32 0 0 4 0 0 228

27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Result of power of 2
1 1 1 1 1 1 1 1 Add the values
128 64 32 16 8 4 2 1 255
Section 3

Translate decimal to binary

27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Results of power of 2
128 64 32 16 8 4 2 1 Decimal is: 255

255-128=127 add a one on the 2^7


127-64=63 add a one on the 2^6
63-32=31 add a one on the 2^5
31-16=15 add a one on the 2^4
15-8=7 add a one on the power of 2^3
7-4=3 add a one on the power of 2^2
3-2=1 add a one on the power of 2^1
1-1=0 add a one on the power of 2^0

27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Results of power of 2
0 0 32 16 8 4 2 1 Decimal is: 31

27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Results of power of 2
0 64 32 16 0 0 0 0 Decimal is:48
27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Results of power of 2
128 0 32 0 8 0 2 0 Decimal is: 42

27 26 25 24 23 22 21 20 Power of 2
128 64 32 16 8 4 2 1 Results of power of 2
0 64 0 16 0 4 0 1 Decimal is: 21

Section 4

Translating binary numbers to hexadecimal numbers


Dec 2x 2^x Binary HexaD
s
0 20 1 0 0
1 21 2 1 1
2 22 4 10 2
3 23 8 11 3
4 24 16 100 4
5 25 32 101 5
6 26 64 110 6
7 27 128 111 7
8 28 256 1000 8
9 29 512 1001 9
10 210 1024 1010 A
11 211 2048 1011 B
12 212 4096 1100 C
13 213 8192 1101 D
14 214 1638 1110 E
4
15 215 3276 1111 F
8

In order to convert to hexadecimals, we must firs separate the byte into two parts of 4 or called a
nibble.
Example

11001010
1100 1010
23 22 21 20 Decimal 23 22 21 20 Decimal
number
8 4 2 1 8 4 2 1 Number

12 1
1 1 0 0 0 1 0 10

8+2=12 =C 8+2=10=A
Hexadecimal =CA

1111 1110
FE
23 22 21 20 Decimal 23 22 21 20 Decimal
number
8 4 2 1 8 4 2 1 Number

15 1
1 1 1 1 1 1 0 14

1100 0010
C2

23 22 21 20 Decimal 23 22 21 20 Decimal
number
8 4 2 1 8 4 2 1 Number

12 0
1 1 0 0 0 1 0 2

1011 0100
B4

23 22 21 20 Decimal 23 22 21 20 Decimal
number
8 4 2 1 8 4 2 1 Number

11 0
8 0 2 1 4 0 0 4

0010 0100
24

23 22 21 20 Decimal 23 22 21 20 Decimal
number
8 4 2 1 8 4 2 1 Number

2 0
0 0 1 0 1 0 0 4

Section 5
Translating Hexadecimals numbers to decimals
27 26 25 24 23 22 21 20 Byte
128 64 32 16 8 4 2 1 42
`ZA 0 1 0 1 0 1 0 Step 2
23=8 22=4 21=2 20=1 23=8 22=4 21=2 20=1 Nibble
0 0 1 0 1 0 1 0 Step 1
Decimal = 42
2 10=A

27 26 25 24 23 22 21 20 Byte
128 64 32 16 8 4 2 1 61
0 0 1 1 1 1 0 1 Step 2
23=8 22=4 21=2 20=1 23=8 22=4 21=2 20=1 Nibble
0 0 1 1 1 1 0 1 Step 1 Decimal=61

3 D

27 26 25 24 23 22 21 20 Byte
128 64 32 16 8 4 2 1 107
0 1 1 0 1 0 1 1 Step 2
23=8 22=4 21=2 20=1 23=8 22=4 21=2 20=1 Nibble
0 1 1 0 1 0 1 1 Step 1 Decimal=107

6 B

27 26 25 24 23 22 21 20 Byte
128 64 32 16 8 4 2 1 156
1 0 0 1 1 1 0 0 Step 2
23=8 22=4 21=2 20=1 23=8 22=4 21=2 20=1 Nibble
1 0 0 1 1 1 0 0 Step 1
9 C
Decimal=156

You might also like