powers are used in digital data
TRANSCRIPT
-
8/13/2019 Powers Are Used in Digital Data
1/16
EE487 Lesson 4:
Digital Data
There are 10 types of people in this world,
those who understand binary, and those who dont.
-
8/13/2019 Powers Are Used in Digital Data
2/16
A Simple Riddle You just lost a MAJOR bet, your options are:
A) Pay $1,000 per day for a month
OR
B) Pay 1 the first day, then double the paymenteach day for a month
Which do you choose?
-
8/13/2019 Powers Are Used in Digital Data
3/16
Topics
Number Bases
Decimal -> Base 10
Binary -> Base 2
-
8/13/2019 Powers Are Used in Digital Data
4/16
Positional number system1
The number system we learned in elementaryschool is an example of a positional number
system.
Numbers are composed of a weighted string ofdigits and the weightings are determined by thedigits position.
3 2 1 0 1 21492.63 1 10 4 10 9 10 2 10 6 10 3 10
1 1000 4 100 9 10 2 1 6 0.1 3 0.01
= + + + + +
= + + + + +
weighting of each digits position
1 Much of this discussion comes from John F. Wakerlys Digital Design: Principles and Practices, 2nded.
-
8/13/2019 Powers Are Used in Digital Data
5/16
Decimal numbers Each digit can take one of ten values.
The weighting of each digits position is a powerof 10.
Hence, decimal numbers are called base 10 orradix 10.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
3 2 1 0 1 2
1492.63 1 10 4 10 9 10 2 10 6 10 3 101 1000 4 100 9 10 2 1 6 0.1 3 0.01
= + + + + +
= + + + + +
weighting of each digits position
-
8/13/2019 Powers Are Used in Digital Data
6/16
Digital signal Digital signals are limited to a finite number of
discrete amplitudes.
In digital computers, the most basic unit storagecan take one of only two values, 1 or 0.
-
8/13/2019 Powers Are Used in Digital Data
7/16
Binary numbers Each binary digit (or bit) can take on one of two
values.
The weighting of each bit position in a binarynumber is a power of 2.
Binary numbers are called base 2 or radix 2.
Binary numbers are denoted by the subscript 2.
0 or 1
3 2 1 0 1 22
10
1101.01 1 2 1 2 0 2 1 2 0 2 1 2
1 8 1 4 0 2 1 1 0 0.5 1 0.25 13.25
= + + + + +
= + + + + + =
-
8/13/2019 Powers Are Used in Digital Data
8/16
Binary numbers The leftmost bit is called the most significant bit
(MSB) because it has the largest weighting.
The rightmost bit is called the least significant bit(LSB) because it has the smallest weighting.
10110111
most significant bit
(MSB)
least significant bit
(LSB)
-
8/13/2019 Powers Are Used in Digital Data
9/16
Binary to decimal conversion We can convert from a binary number to a
decimal as previously indicated.
It is helpful to be familiar with powers of 2.
5 4 3 2 1 02
10
100010 1 2 0 2 0 2 0 2 1 2 0 2
1 32 0 16 0 8 0 4 1 2 0 0 34
= + + + + +
= + + + + + =
0 1 2 3
4 5 6 7
8 9 10 11
2 1 2 2 2 4 2 82 16 2 32 2 64 2 128
2 256 2 512 2 1024 2 2048
= = = =
= = = =
= = = =
-
8/13/2019 Powers Are Used in Digital Data
10/16
Convert the binary number 10111012 into decimal.
Example Problem 1
-
8/13/2019 Powers Are Used in Digital Data
11/16
Convert the binary number 10111012 into decimal.
Example Problem 1
1 0 1 1 1 0 164 32 16 8 4 2 1
64 + 16 + 8 + 4 + 1 = 93
sum the weight values correspondingto the 1s in the binary number
-
8/13/2019 Powers Are Used in Digital Data
12/16
Decimal to binary conversion To convert from decimal numbers to binary:
1. Repeatedly divide the quotients by two until the final quotient is zero.
2. The remainders read in reverse order yield the equivalent binarynumber.
Convert 20310 into binary.
Quotient Remainder203/ 2 101 1101/2 50 150/ 2 25 0
25/ 2 12 112 / 2 6 06/ 2 3 03/ 2 1 11/ 2 0 1
=
=
=
==
=
=
=
stop when quotient equals zero
110010112
Read binary equivalentin reverse order
first remainder becomesthe right-most digit
-
8/13/2019 Powers Are Used in Digital Data
13/16
Convert 18210 into binary.
Example Problem 2
-
8/13/2019 Powers Are Used in Digital Data
14/16
Convert 18210 into binary.
Example Problem 2
Quotient Remainder182 2 91 091 2 45 145 2 22 122 2 11 011 2 5 15 2 2 12 2 1 0
1
2 0 1
1 0 1 1 0 1 1 0
-
8/13/2019 Powers Are Used in Digital Data
15/16
Using binary addition, count in binary from 0 to 8.
Example Problem 4
0 0 0 0 0
0 0 0 1 1
0 0 1 0 2
0 0 1 1 3
0 1 0 0 4
0 1 0 1 5
0 1 1 0 60 1 1 1 7
1 0 0 0 8
8 4 2 1
-
8/13/2019 Powers Are Used in Digital Data
16/16
EE487 Lesson 4:
Digital Data
There are 10 types of people in this world,
those who understand binary, and those who dont.
WHICH TYPE ARE YOU???