Documente Academic
Documente Profesional
Documente Cultură
Learning Outcomes
Explain why computer designers chose to use the binary system for representing information in computers. Explain what a binary digit is. Explain what a byte is.
Learning Outcomes
Computer Number Systems
Convert decimal numbers to binary. Convert binary numbers to decimal. Convert binary numbers to hexadecimal. Convert hexadecimal. Numbers to binary. Convert hexadecimal numbers to decimal. Convert decimal numbers to hexadecimal.
Learning Outcomes
Associate electronic prefixes with their meanings. Identify the special quantities specified by the terms kilobyte and megabyte.
Learning Outcomes
Identify the special code used to represent alphanumeric characters in PCs. Describe the parity method of detecting data errors in PCs.
Why binary?
The original computers were designed to be high-speed calculators. The designers needed to use the electronic components available at the time. The designers realized they could use a simple coding system--the binary system-to represent their numbers
The term binary digit is commonly called a bit. Eight bits grouped together is called a byte.
Numbering Systems
Background Information
Numbering Systems
10 10 10 10 1000 100 10 1 1 4 9 2
Numbering Systems
1492
1x 4x 9x 2x 1000 = 100 = 10 = 1= + 1000 400 90 2
1492
Numbering Systems
Binary Numbers
The prefix bi- stands for 2 The binary number system is a Base 2 number system:
There are 2 symbols that represent quantities:
0, 1
Numbering Systems
8 3 2 1
4 2 1 2 1 0 2 2 2 0 1 1
Numbering Systems
1011
1x 8= 0x 4= 1x 2= 8 0 2
1x 1= + 1 11
Numbering Systems
128 64 32 16 8 4 2 1 2 2 2 2 2 2 2 2 1 0 1 1 0 1 0 1
7 6 5 4 3 2 1 0
Numbering Systems
16 8 4 2
1 0 1 0 1
Numbering Systems
16 8 4
16 + 4+
2 1
1 = 21
1 0 1 0 1
11
4 2 1 1 0 1 4 + 1=101
0 0 1 0 1 to decimal.
64 32 16 8 0 1 1 0 64 + 32 +
Numbering Systems
Both methods produce the same result and you should use whichever one you are most comfortable with.
Numbering Systems
Numbering Systems
853
1024 512 256 128 64 32 16 8 4 2 1
Numbering Systems
853
1024 512 256 128 64 32 16 8 4 2 1
Numbering Systems
Numbering Systems
Numbering Systems
The resulting set of 1s and 0s is the binary equivalent of the decimal number you started with.
1 1 0 1 0 1 0 1 0 1
21 - 16 5 5 -8 X 5 -4 1 1 -2 X 1 -1 0
Numbering Systems
Numbering Systems
Step 2:
Use the remainder as the LEAST SIGNIFICANT DIGIT of the binary number.
Numbering Systems
Step 4:
Use the remainder as the next digit of the binary number.
Numbering Systems
Step 6:
Use the last remainder (the one that cant be divided by 2) as the MOST SIGNIFICANT digit.
Step 2:
The remainder of 1 becomes the LEAST significant digit of the number. 1
Step 4:
The remainder of 0 becomes the next digit of the number. 0 1
Step 6:
The final quotient of 1 comes down to be the most significant digit.
Numbering Systems
Hexadecimal Numbers
The prefix hexa- stands for 6 and the prefix deci- stands for 10 The hexadecimal number system is a Base 16 number system:
There are 16 symbols that represent quantities:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Numbering Systems
Hexadecimal Numbers
We use hexadecimal numbers as shorthand for binary numbers Each group of four binary digits can be represented by a single hexadecimal digit.
Numbering Systems
Hexadecimal Numbers
Dec 0 1 2 3 4 5 6 7 Bin 0000 0001 0010 0011 0100 0101 0110 0111 Hex 0 1 2 3 4 5 6 7 Dec 8 9 10 11 12 13 14 15 Bin 1000 1001 1010 1011 1100 1101 1110 1111 Hex 8 9 A B C D E F
Numbering Systems
Numbering Systems
Numbering Systems
Numbering Systems
Numbering Systems
Step 2:
The remainder of 5 becomes the LEAST significant digit of the number. 5
Step 4:
The remainder of 5 becomes the next digit of the number. 5 5
Numbering Systems
Numbering Systems
16 16 16 16 4096 256 16 1 2 F A 4
Electronics Prefixes
There is a set of of terms used in electronics used to represent different powers of ten. There is a set of terms used to represent large whole numbers and a set of terms used to represent small fractional numbers.
n
p
pico 1 / 1,000,000,000,000
Parity Bits
There are two methods for checking parity:
Odd Even
Both methods are equally effective but the method must be consistent within an operation.
If odd parity was used to store the byte, odd parity must be used to read it.
Odd Parity
The parity checking circuit counts the number of 1 bits and adds the parity bit to make the total number of 1 bits an ODD number. Examples
1 0 0 1 0 0 1 1 has four 1s so the parity bit would be a 1 1 1 0 0 1 1 1 0 has five 1s so the parity bit would be a 0
Even Parity
The parity checking circuit counts the number of 1 bits and adds the parity bit to make the total number of 1 bits an EVEN number. Examples
1 0 0 1 0 0 1 1 has four 1s so the parity bit would be a 0 1 1 0 0 1 1 1 0 has five 1s so the parity bit would be a 1
Summary