Title: ELE 336 Digital Systems Laboratory
1ELE 336Digital Systems Laboratory
- 1st Meeting
- Noon Today!
- Anderson 231
2Digital vs. Analog
- An analog system has a continuous range of values
- A mercury thermometer
- Vinyl records
- AM radio
- The set of real numbers
- A digital system has a set of discrete values
- CDs
- DSS TV
- The set of integers
3Benefits of Digital
- Cheap electronic circuits
- Easier to calibrate and adjust
- Resistance to noise
An analog signal
The digital equivalent
4Resistance to Noise
An analog signal
The digital equivalent
5The Binary Number System
- Numbers have positional importance
- 349.2510
2 x 10-1 2/10
9 x 100 9 x 1 9
5 x 10-2 5/100
4 x 101 4 x 10 40
3 x 102 3 x 100 300
In the binary system, positional importance
follows powers of 2
6Why Binary?
- All binary digits (bits) are 0 or 1
- Any device with two states can be used to
represent binary digits
Open
Early computers used switches
Closed
Modern computers use transistors which can
be Saturated On Cutoff Off
7Binary Numbers
1 x 2-2 1/4
0 x 2-1 0
1 x 20 1 x 1 1
1 x 21 1 x 2 2
0 x 22 0 x 4 0
1 x 23 1 x 8 8
1 0 1 1. 0 1 2 11-1/410 11.2510
8Counting in Base 2
- Base 10 Base 2
- 0 0
- 1 1
- 2 10
- 3 11
- 4 100
- 5 101
- 6 110
- 7 111
-
Base 10 Base 2 8 1000 9 1001 10 1010 11
1011 12 1100 13 1101 14 1110 15 1111
9Powers of 2
- 20 1
- 21 2 2-1 1/2
- 22 4 2-2 1/4
- 23 8 2-3 1/8
- 24 16 2-4 1/16
- 25 32 2-5 1/32
- 26 64 2-6 1/64
- 27 128 2-7 1/128
- 28 256 2-8 1/256
- 29 512 2-9 1/512
- 210 1024 2-10 1/1024
210 1024 1K
10A Heuristic Way to Convert Decimal to Binary
- Consider that you have the powers of 2 (like pool
balls). Put a 1 in the right position to
include them and put a 0 in the right position
to omit them - 25 24 23 22 21 20 . 2-1 2-2
- 32, 16, 8, 4, 2, 1 . 1/2, 1/4
- What is the binary representation of 40.7510?
40 32 8 0.75 1/2 1/4 40.7510 101000.112
11A Structured Way to ConvertDecimal to Binary
- X10 abcdef2
- X10 a25 b24 c23 d22 e21 f20
- Divide by two
X/2 a24 b23 c22 d21 e20
f
Quotient (call it Y)
Remainder
The first remainder after dividing by 2 is the
least significant bit of the binary representation
12Continued division
- X/2 a24 b23 c22 d21 e20
f
Quotient (call it Y)
Remainder
The second remainder after dividing by 2 is the
coefficient of 21 in the binary representation
? Continue dividing and saving remainders
13An Example
- What is the binary representation of 6110?
- 61/2 30 with a remainder of 1
- 30/2 15 with a remainder of 0
- 15/2 7 with a remainder of 1
- 7/2 3 with a remainder of 1
- 3/2 1 with a remainder of 1
- 1/2 0 with a remainder of 1
Read remainders from last to first 6110 1111012
14Check your work
- 6110 1111012 Is this the right answer?
- 1111012
- 1 4 8 16 32 61
15Homework for Monday, Jan. 10
- 1) (10 points)
- What decimal number is represented by the
following binary numbers?A) 1001101.0012 - B) 11100. 1002
- 2) (10 points)
- What is the binary representation of the
following decimal numbers? - A) 91.510
- B) 65.2510
16For Monday, Jan. 11
- Review Homework Problems
- Addition, Subtraction
- 2s Complement
- 16 / 8 / 2hexadecimal, octal, binary