+ All Categories
Home > Education > 2013 digital sytem-1-lecture01

2013 digital sytem-1-lecture01

Date post: 18-May-2015
Category:
Upload: yasin-p
View: 55 times
Download: 2 times
Share this document with a friend
Description:
This is basic in digital system
Popular Tags:
29
1 Digital Systems I Digital Systems I Lecture 1 Introduction and Number Systems
Transcript
Page 1: 2013 digital sytem-1-lecture01

1

Digital Systems IDigital Systems I

Lecture 1

Introduction and Number Systems

Page 2: 2013 digital sytem-1-lecture01

2

SyllabusSyllabus

Text : David M. Harris and Sarah Harris,

Digital Design and Computer Architecture,

Elsevier, 2007

Coverage:

1. Basic Concepts (Chapter 1)

2. Combinational Logic Design (Chapter 2)

3. Sequential Logic Design (Chapter 3)

4. Digital Building Blocks (Chapter 5)

Page 3: 2013 digital sytem-1-lecture01

3

Course RequirementsCourse Requirements

• Class Participation– If you need to miss class, email me beforehand

• Assignments:– Problem sets (20%)

• Exams– Quizzes (20%)– Midterm (20%)– Final (40%)

• Late policy– No late assignments accepted

Page 4: 2013 digital sytem-1-lecture01

4

Why Study Digital Design?Why Study Digital Design?

• Look “under the hood” of computers– Solid understanding --> confidence,

insight

• Electronic devices becoming digital– Enables:

• Better devices: Better sound recorders, cameras, cars, cell phones, medical devices,...

• New devices: Video games, PDAs, ...– Known as “embedded systems”

• Thousands of new devices every year

• Designers needed: Potential career direction

Page 5: 2013 digital sytem-1-lecture01

5

Embedded SystemsEmbedded Systems

• Embedded computing systems– Computing systems embedded

within electronic devices– Hard to define. Nearly any

computing system other than a desktop computer

– Billions of units produced yearly, versus millions of desktop units

– Perhaps 50 per household and per automobile

Computers are in here...

and here...

and even here...

Lots more of these, though they cost a lot

less each.

Page 6: 2013 digital sytem-1-lecture01

6

Embedded System ExampleEmbedded System Example

Microcontroller

CCD preprocessor Pixel coprocessorA2D

D2A

JPEG codec

DMA controller

Memory controller ISA bus interface UART LCD ctrl

Display ctrl

Multiplier/Accum

Digital camera chip

lens

CCD

• Single-functioned -- always a digital camera• Tightly-constrained -- Low cost, low power, small, fast• Reactive and real-time -- only to a small extent

Page 7: 2013 digital sytem-1-lecture01

7

What Does “Digital” Mean?What Does “Digital” Mean?

• Analog signal

– Inifinite possible values• Ex: voltage on a wire

created by microphone

valu

e

time

valu

etime

microphone

Soundwaves

which movesthe magnet,

which createscurrent in the nearby wire

move themembrane,

analog signal

3 421

2 digital signal

• Digital signal– Finite possible values

• Ex: button pressed on a keypad

01234

Possible values:1.00, 1.01, 2.0000009, ... infinite possibilities

Possible values:0, 1, 2, 3, or 4.That’s it.

Page 8: 2013 digital sytem-1-lecture01

8

Binary Digital SignalsBinary Digital Signals

• Binary digital signal -- only two possible values– Typically represented as 0 and 1– One binary digit is a bit– We’ll only consider binary digital signals– Binary is popular because

• Transistors, the basic digital electric component, operate using two voltages

• Storing/transmitting one of two values is easier than three or more (e.g., loud beep or quiet beep, reflection or no reflection)

valu

e

time

10

Page 9: 2013 digital sytem-1-lecture01

9

SwitchesSwitches

Page 10: 2013 digital sytem-1-lecture01

10

Digitization BenefitDigitization Benefit

• Analog signal (e.g., audio) may lose quality

– Voltage levels not saved/copied/transmitted perfectly

• Digitized version enables near-perfect save/cpy/transmit.

– “Sample” voltage at particular rate, save sample using bit encoding

– Voltage levels still not kept perfectly

– But we can distinguish 0s from 1s

time

Vol

ts

01

2

3

original signal

leng

thy

tran

smis

sion

(e.g

, cel

l pho

ne)

time01

2

3

received signal

How fix -- higher, lower, ?

leng

thy

tran

smis

sion

(e.g

, cel

l pho

ne)

01 10 11 10 11

same

time

01 10 11 10 11

Vol

tsdigitized signal

time0

1

a2d

Vol

ts

01

2

3d2a

Let bit encoding be: 1 V: “01” 2 V: “10” 3 V: “11”

timeCan fix -- easily distinguish 0s

and 1s, restore

0

1

Digitized signal notperfect re-creation,but higher sampling rate and more bits per encoding brings closer.

a

Page 11: 2013 digital sytem-1-lecture01

11

Encoding Data as BinaryEncoding Data as Binary

• Some inputs inherently binary– Button: not pressed (0),

pressed (1)• Some inputs inherently

digital– Just need encoding in

binary– e.g., multi-button input:

encode red=001, blue=010, ...

• Some inputs analog– Need analog-to-digital

conversion– As done in earlier slide --

sample and encode with bits

0

button

green blackbluered

0 00

red

0 10

green blackblue

1 00

green blackbluered

temperaturesensor

air

0 0 1 10 0 0 0

33 degrees

a

sensors andother inputs

Digital System

actuators andother outputs

A2D

D2A

analogphenomena

electricsignal

digitaldata

digitaldata

electricsignal

digitaldata

digitaldata

Page 12: 2013 digital sytem-1-lecture01

12

Digital DesignDigital Design

General engineering principles for complex systems:– Abstraction– Discipline– The three -Y’s

• Hierarchy• Modularity• Regularity

Page 13: 2013 digital sytem-1-lecture01

13

AbstractionAbstraction

• Hiding details when they aren’t important

Physics

Devices

AnalogCircuits

DigitalCircuits

Logic

Micro-architecture

Architecture

OperatingSystems

ApplicationSoftware

electrons

transistorsdiodes

amplifiersfilters

AND gatesNOT gates

addersmemories

datapathscontrollers

instructionsregisters

device drivers

programs

Page 14: 2013 digital sytem-1-lecture01

14

DisciplineDiscipline

• Intentionally restricting your design choices (so that you can work more productively at a higher level of abstraction)

Page 15: 2013 digital sytem-1-lecture01

15

The Three -Y’sThe Three -Y’s

• Hierarchy– Dividing a system into modules and

submodules

• Modularity– Well-defined functions and interfaces

• Regularity– Uniformity, so modules can be easily reused

Page 16: 2013 digital sytem-1-lecture01

16

Digital AbstractionDigital Abstraction

• 1’s and 0’s

• bits: binary digit

Page 17: 2013 digital sytem-1-lecture01

17

Codes for Representing InformationCodes for Representing Information

Page 18: 2013 digital sytem-1-lecture01

18

Binary CodeBinary Code

Page 19: 2013 digital sytem-1-lecture01

19

• Decimal numbers

• Binary numbers

Number SystemsNumber Systems

537410 = 5 × 103 + 3 × 102 + 7 × 101 + 4 × 100

fivethousands

10's colum

n10

0's column

1000

's colu

mn

threehundreds

seventens

fourones

1's colu

mn

11012 = 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 = 1310oneeight

2's colu

mn

4's colu

mn

8's colu

mn

onefour

notwo

oneone

1's colu

mn

Page 20: 2013 digital sytem-1-lecture01

20

• Decimal to binary conversion:– Convert 101012 to decimal

• Decimal to binary conversion:– Convert 4710 to binary

Number ConversionNumber Conversion

Page 21: 2013 digital sytem-1-lecture01

21

Hexadecimal NumbersHexadecimal Numbers

Hex Digit Decimal Equivalent Binary Equivalent0 0 0000

1 1 0001

2 2 0010

3 3 0011

4 4 0100

5 5 0101

6 6 0110

7 7 0111

8 8 1000

9 9 1001

A 10 1010

B 11 1011

C 12 1100

D 13 1101

E 14 1110

F 15 1111

Page 22: 2013 digital sytem-1-lecture01

22

• Hexadecimal to binary conversion:– Convert 4AF16 (0x4AF) to binary

• Hexadecimal to decimal conversion:– Convert 0x4AF to decimal

Number ConversionNumber Conversion

Page 23: 2013 digital sytem-1-lecture01

23

Bits, Bytes, Nibbles…Bits, Bytes, Nibbles…

• Bits

• Bytes & Nibbles

• Bytes

10010110nibble

byte

CEBF9AD7least

significantbyte

mostsignificant

byte

10010110least

significantbit

mostsignificant

bit

Page 24: 2013 digital sytem-1-lecture01

24

• Decimal

• Binary

AdditionAddition

37345168+8902

carries 11

10110011+1110

11 carries

Page 25: 2013 digital sytem-1-lecture01

25

• Add the following 4-bit binary numbers

• Add the following 4-bit binary numbers

Binary Addition ExamplesBinary Addition Examples

10010101+

10110110+

Page 26: 2013 digital sytem-1-lecture01

26

Signed Binary NumbersSigned Binary Numbers

• Sign and Magnitude:– 1 sign bit, N-1 magnitude bits

– Example: -5 = 11012

+5 = 01012

• Two’s Complement– Same as unsigned binary, but most

significant bit (msb) has value of -2N-1

– Most positive 4-bit number: 01112

– Most negative 4-bit number: 10002

Page 27: 2013 digital sytem-1-lecture01

27

““Taking the Two’s Complement”Taking the Two’s Complement”

• Reversing the sign of a two’s complement number

• Method:1. Invert the bits

2. Add 1

• Example: Reverse the sign of 01111. 1000

2. + 1

1001

Page 28: 2013 digital sytem-1-lecture01

28

Two’s Complement ExamplesTwo’s Complement Examples

• Take the two’s complement of 0101.

• Take the two’s complement of 1010.

Page 29: 2013 digital sytem-1-lecture01

29

Two’s Complement AdditionTwo’s Complement Addition

• Add 6 + (-6) using two’s complement numbers.

• Add -2 + 3 using two’s complement numbers.

+01101010

10000

111


Recommended