Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Electronics and Communication Engineering Department Indus Institute of Technology and Engineering
Number
s stems Decimal s stem Bi ar , ctal and ex s stems Number conversion, decimal to binar , binar to decimal Complements Subtraction met ods Codes: Binar , Gray, Error detection Binary Logic
A bit is a single binary digit (a or 0). A byte is 8 bits A word is 32 bits or 4 bytes Long word = 8 bytes = 64 bits Quad word = 6 bytes = 28 bits Programming languages use t ese standard number of bits w en organizing data storage and access. W at do you call 4 bits? ( int: it is a small byte)
Base 0 2 8 6
Symbols 0, , 9 0, 0, , 7 0, , 9, A, B, F
The
decimal system is composed of 0 numerals or symbols. These 0 symbols are 0, , 2, 3, 4, 5, 6, 7, 8, 9. Using these symbols as digits of a number, we can express any quantity. The decimal system is also called the base-10 system because it has 10 digits.
103
102
101
100
10-1
10-2
10-3
=100
=10
=1
=0.1
=0.01
Decimal point
Even though the decimal system has only 10 symbols, any number of any magnitude can be expressed by using our system of positional weighting.
where
N = an-1 x rn-1 + an-2 x rn-2 + ... + a0 x r0 + a-1 x r-1 ... + a-m x r-m = (an-1 an-2 . a0 a-1 . a-m )
Example N = (251.41)10 (Positional Notation) = 2 x 102 + 5 x 101 + 1 x 100 + 4 x 10-1 + 1 x 10-2 (Polynomial Notation)
5 6 2 1
103 102 101 100
= 1 = 20 = 600 = 5000
In
the binary system there are only two symbols or possible digit values, 0 and 1. This base-2 system can be used to represent any quantity that can be represented in decimal or other base system.
22 =4 21 =2 20 =1 . Binary point 2-1 =0.5 2-2 =0.25 2-3 =0.125 Least Signifi cant Digit
23
22 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
21 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
20 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Decimal 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
The
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
In
digital systems the information that is being processed is usually presented in binary form. Binary quantities can be represented by any device that has only two operating states or possible conditions. E.g.. a switch is only open or closed. We arbitrarily (as we define them) let an open switch represent binary 0 and a closed switch represent binary 1. Thus we can represent any binary number by using series of switches.
Binary
1: Any voltage between 2V to 5V Binary 0: Any voltage between 0V to 0.8V Not used: Voltage between 0.8V to 2V in 5 Volt CMOS and TTL Logic, this may cause error in a digital circuit. Today's digital circuits wor s at 1.8 volts, so this statement may not hold true for all logic circuits.
The
octal number system has a base of eight, meaning that it has eight possible digits: 0,1,2,3,4,5,6,7.
Each
bits
83 =512 Most Signifi cant Digit
Octal
To convert binary to octal make groups of 3 bits each from right and replace each group with octal number 0101010111010011 0 101 010 111 010 011 0 5 2 1 2 3
The
hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0 through 9 plus the letters A, B, C, D, E, and F as the 16 digit symbols.
163 =4096 Most Signifi cant Digit 162 =256 161 =16 160 =1 . Hexa Decim al point 16-1 =1/16 16-2 =1/25 6 16-3 =1/40 96 Least Signifi cant Digit
Binary
Decimal
Hexadecimal
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 1 2 3 4 5 6 7 8 9 A B C D E F
Hexadecimal
0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
To convert binary to hex, make groups of 4 binary bits beginning with LSB. Write equivalent symbol for each group.
Converting
from one code form to another code form is called code conversion, li e converting from binary to decimal or converting from hexadecimal to decimal.
Binary
Hexadecimal
Deci al
Octal
Binary
Hexadeci al
Next slide
Weight
12510 =>
Base
Decimal
Octal
Binary
Hexadecimal
Technique
Multiply each bit by 2n, where n is the weight of the bit 1 The weight is the position of the bit, starting from 0 on the right Add the results
Bit 0
1010112 =>
1 1 0 1 0 1
x x x x x x
20 21 22 23 24 25
= 1 = 2 = 0 = 8 = 0 = 32 4310
Binary
x x x x x x
= = = = = =
Decimal
Octal
Binary
Hexadecimal
Technique
Multiply each bit by 8n, where n is the weight of the bit The weight is the position of the bit, starting from 0 on the right Add the results
7248 =>
4 x 80 = 2 x 81 = 7 x 82 =
4 16 448 46810
Decimal
Octal
Binary
Hexadecimal
Technique
Multiply each bit by 16n, where n is the weight of the bit The weight is the position of the bit, starting from 0 on the right Add the results
ABC16 =>
Decimal
Octal
Binary
Hexadecimal
Technique
Divide by two, eep track of the remainder First remainder is bit 0 (LSB, least-significant bit) Second remainder is bit 1 Etc.
12510 = ?2
2 125 2 62 2 31 2 15 7 2 3 2 1 2 0
1 0 1 1 1 1 1
12510 = 11111012
Decimal
3.14579
to binary
11.001001...
Decimal
Octal
Binary
Hexadecimal
Technique
Example
7058 = ?2 7 0 5
Decimal
Octal
Binary
Hexadecimal
Technique
10AF16 = ?2
10AF16 = 00010000101011112
Decimal
Octal
Binary
Hexadecimal
Technique
Decimal
Octal
Binary
Hexadecimal
Technique
2 13 = D 4
123410 = 4D216
Decimal
Octal
Binary
Hexadecimal
Technique
10110101112 = ?8
10110101112 = 13278
Decimal
Octal
Binary
Hexadecimal
Technique
10101110112 = ?16
10 1011 1011
10101110112 = 2BB16
Decimal
Octal
Binary
Hexadecimal
Technique
10768 = ?16
1 0 7 6
Make a group of 4 bit From right side & assign decimal digit to this group of 4 bit
001 000
111 E
110
10768 = 23E16
Decimal
Octal
Binary
Hexadecimal
Technique
1F0C16 = ?8 1 F 0 C
0001
1111
0000
1100
1F0C16 = 174148
Decimal 33
Binary 1110101
Octal
Hexadecimal
703 1AF
Dont use a calculator! Skip answer Answer
Answer
Base
10
Power
10-12 10-9 10-6 10-3 103 106 109 1012
ol
Base
Power
210 220 230
ol
What is the value of k, M, and G? In computing, particularly w.r.t. memory, the base-2 interpretation generally applies
/ 230 =