CSE 111 Information Representation in the Digital World

advertisement
CSE 111
Information Representation in the
Digital World
Analog vs. Digital
Faucet Example
Consider a faucet
Digital
Water can be flowing or NOT flowing from the faucet
 Two States
 On
 Off
Analog
How much water is flowing from the faucet?
 How many different answers can there be to this question?
Analog vs. Digital
Faucet Example
Advantages of Digital
Replication
 Analog
 Try replicating the exact flow from a faucet
 Digital
 Try replicating ON or OFF
Analog vs. Digital
Advantages of Digital Circuits
Replication
Error Correction/Detection
 Small errors don’t propagate
Miniturization of Circuits
Programmability
 Digital computers are programmable
The Digital System
Two discrete values are used in digital
systems.
How are discrete elements represented?
Signals are the physical quantities used to represent
discrete elements of information in a digital system.
Electric signals used:
Voltage
Current
The Digital System
Volts
Representation of Binary Values
6.0
5.0
4.0
3.0
2.0
1.0
0.0
-1.0
High
Low
The Digital System
Volts
Representation of Binary Values
6.0
5.0
4.0
3.0
2.0
1.0
0.0
-1.0
1
0
Why are there voltage ranges instead of exact
voltages?
Variations in circuit behavior & noise
The Binary System
Why use binary?
Natural Choice
A switch can be ‘on’ or ‘off’
Two states
 Binary has two symbols, 1 and 0
A transistor is an automated, electrically controlled
switch
The Bit
The smallest unit that can represent
information
Binary Digit
Two possible values
1, 0
On, Off
True, False
High, Low
Heads, Tails
Black, White
How many bits does it take?
One bit can represent two numbers (0, 1)
21 = 2
Two bits can represent four numbers (00, 01, 10, 11)
22 = 4
Three bits can represent eight numbers (000, 001, 010, 011,
100, 101, 110, 111)
23 = 8
Four bits can represent how many numbers?
24 = 16
Ten bits can represent how many numbers?
210=1,024
64 bits can represent how many numbers?
264=18,446,744,073,709,551,616
Note the importance of the math!
You’re NOT going to enumerate all possible
combinations and count them to answer this question!
Bits & Bytes
Nibble
4 bits
Older term, not widely used today
Byte
8 bits
Word
The number of bits a microprocessor can process at
a single time
Most of today’s processor have a 32-bit word size
64-bit is quickly becoming the norm
Data Representation
Bits are grouped to represent both data and
instructions in a digital system
Coding Techniques
Defines how bits are grouped together to represent
information
Types
Numeric
Character
Error Detection/Correction
References
Donald D. Givone, Digital Principles and Design,
McGraw-Hill, 2003
Download