Top Banner
Flavors of Electronics An exploration of a few simple ideas 1 P Joy Prabhakaran https://www.linkedin.com/profile/view?id=22548506&trk=hp- identity-name
37

A few fundamental concepts in digital electronics

Jul 27, 2015

Download

Education

Joy Prabhakaran
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A few fundamental concepts in digital electronics

1

Flavors of ElectronicsAn exploration of a few simple ideas

P Joy Prabhakaranhttps://www.linkedin.com/profile/view?id=22548506&trk=hp-identity-name

Page 2: A few fundamental concepts in digital electronics

2

Electronics: What does it do for us?

• Compute• Store• Communicate• Sense• Control• Interact with humans

Page 3: A few fundamental concepts in digital electronics

3

Binary numbers

Decimal numbers– Base 10– 10 symbols: 0 to 9– 576 = 5 x 102 + 7 x 101 + 6 x 100

Binary numbers– Base 2– 2 symbols: 0 & 1– 101 = 1 x 22 + 0 x 21 + 1 x 20 = ? In decimal

Page 4: A few fundamental concepts in digital electronics

4

Compute: How?• Logic

NOT, OR, AND, XOR• Numeric Comparison

=, >, <• Arithmetic

ADD, SUB, MULT, DIV

Can all these be built using the switches shown here?

Many of the ideas here are probably derived from Shannon’s work referred to at: http://en.wikipedia.org/wiki/A_Symbolic_Analysis_of_Relay_and_Switching_Circuits

Page 5: A few fundamental concepts in digital electronics

5

The NOT gateA few notations:

5V, 1, ON, TRUE are all used in a near synonymous manner.The switch is “pressed” when the Input is 1.If the connection to 5V is not present, the output is at 0. Also referred to as OFF or FALSE at times.

With that out of the way let us explore what the NOT logic is and if we can implement it using these switches.

I/P O/P1 00 1

Page 6: A few fundamental concepts in digital electronics

6

AND

What should an “AND” implementation do?

How can this be built using our switches?

A B O/P

0 0 0

0 1 0

1 0 0

1 1 1

Page 7: A few fundamental concepts in digital electronics

7

OR

What should an “OR” implementation do?

How can this be built using our switches?

A B O/P

0 0 0

0 1 1

1 0 1

1 1 1

Page 8: A few fundamental concepts in digital electronics

8

XOR

What should an “XOR” implementation do?

How can this be built using our switches?

A B O/P

0 0 0

0 1 1

1 0 1

1 1 0

Page 9: A few fundamental concepts in digital electronics

9

NAND

How about a NAND (following truth table)?

A B O/P

0 0 1

0 1 1

1 0 1

1 1 0

Page 10: A few fundamental concepts in digital electronics

10

Gates and the symbols to denote them

Page 11: A few fundamental concepts in digital electronics

11

Checking for equalityWhat does the following do?

O/P =

A B O/P

0 0 1

0 1 0

1 0 0

1 1 1

Build a circuit to check equality of two 2-bit numbers A1A0 and B1B0

O/P =

What if we use an XNOR?

Page 13: A few fundamental concepts in digital electronics

13

Addition: One bit half adderA one bit half adder:

What is the truth table for S and Cout?

Two inputs (A, B) and two outputs ( S, Cout)Addition operation

A B S Cout

0 0 0 0

0 1 1 0

1 0 1 0

1 1 0 1

What is the logic for S and Cout?

Page 14: A few fundamental concepts in digital electronics

14

One bit full adderA one bit full adder:

What is the truth table for S and Cout?

Three inputs (A, B, C) and two outputs (S, Cout)Addition operation

A B C S Cout

0 0 0 0 0

0 1 0 1 0

1 0 0 1 0

1 1 0 0 1

0 0 1 1 0

0 1 1 0 1

1 0 1 0 1

1 1 1 1 1

… and the logic S and Cout?

• S is true if only one input is true or if all three are true.

• Cout is true if any two inputs are true.

Page 15: A few fundamental concepts in digital electronics

15

Build an 8 bit adder

Page 16: A few fundamental concepts in digital electronics

16

Latches & Flip Flops• Latches & Flip flops are built using basic gates and

can store data.• They can be level triggered or edge triggered.• They are an intrinsic part of storage, counters etc.

S R CLK D Q0 1 X X 1 01 0 X X 0 10 0 X X Unstable1 1 ↑ 1 1 01 1 ↑ 0 0 11 1 ↓ X No change1 1 ― X No change

The D flip flop

Page 17: A few fundamental concepts in digital electronics

18

What would this circuit do• R is made zero and then kept high throughout. After this, a clock is applied.• What will the output be each time the clock goes high from low.

R Clk

0 X 0 0 0 0

1 ↑ 0 0 0 1

1 ↑ 0 0 1 1

1 ↑ 0 1 1 1

1 ↑ 1 1 1 1

Page 18: A few fundamental concepts in digital electronics

19

… and what about this?

R Clk0 X 0 0 0 01 ↑ 0 0 0 11 ↑ 0 0 1 11 ↑ 0 1 1 11 ↑ 1 1 1 11 ↑ 1 1 1 01 ↑ 1 1 0 01 ↑ 1 0 0 01 ↑ 0 0 0 0

Page 19: A few fundamental concepts in digital electronics

20

Store: A few examples of data storage

• Mechanical• Electrical• Magnetic• Optical

Page 20: A few fundamental concepts in digital electronics

21

Store: A few examples of data storage

Page 21: A few fundamental concepts in digital electronics

22

Magnetic storage

Source: http://en.wikipedia.org/wiki/Hard_disk_drive

Page 22: A few fundamental concepts in digital electronics

23

Optical storage

http://www.britannica.com/EBchecked/media/106454/On-optical-discs-such-as-compact-discs-and-digital-videodiscs?topicId=430490

Page 23: A few fundamental concepts in digital electronics

24

A conceptual exploration of addressable and programmable storage with no moving parts

What is O/P in relation with A1?

Assuming only one of A1 and A2 can be 1 at any time, what is the relationship between A1 and A2 in the two schematics on the right

Any ideas on how all this could lead to a memory device?

Page 24: A few fundamental concepts in digital electronics

25

...conceptual exploration of memory

Discuss how the schematic can become the basic idea behind devices like RAMs, EPROMs, EEPROMs etc with Ai becoming the addressing mechanism

Page 25: A few fundamental concepts in digital electronics

26

Communicate: How?

Send a signal from the source to the destination.• Challenges– How does one “send a signal”?

• Transmitter• Conceptually, what should a transmitter look like?

– How does one receive a signal?• Receiver• Conceptually, what should a receiver look like?

– How does the signal go from the sender to the receiver?• Transmission channel and medium.

Page 26: A few fundamental concepts in digital electronics

27

Sense: How?

• Sensors are used to sense. A sensor is a transducer.• A sensor (transducer) converts a physical

parameter into some other physical parameter that can be used to sense the former. Example: A thermometer

• In electronics and automated systems, the physical parameter is typically converted to a voltage or current for this can be easily measured.

Page 27: A few fundamental concepts in digital electronics

28

Physics behind a few common sensors• Resistive sensors.

– Uses the fact that resistance of certain materials vary with physical parameters. Eg: Resistive temperature detectors, Strain gauges.

• Photoelectric sensors– Uses the fact that a measurable current is generated in a photo

diode when exposed to light. Eg: Used in light sensors

• Thermocouples– Uses the fact that Any junction of dissimilar metals will produce

an electric potential related to temperature. Eg: Temp sensors used in Steel industry, water heaters etc.

• Piezo electric sensors– Uses the fact that electric charge accumulates in certain solid

materials (such as crystals, certain biological matter such as bone, DNA and some proteins) in response to applied mechanical stress. Eg: Early use as a submarine sonar by responding to the sonar echo.

Page 28: A few fundamental concepts in digital electronics

29

A few basic concepts from analog communication

• Wavelength• Frequency• Period• Amplitude• Low pass, high

pass, band pass signals

Page 29: A few fundamental concepts in digital electronics

30

Switching to the digital domain

• Sampling• Quantization• Quantization error• Types of quantization• Nyquist

Page 30: A few fundamental concepts in digital electronics

31

Sampling

Page 31: A few fundamental concepts in digital electronics

32

Quantization

Page 32: A few fundamental concepts in digital electronics

33

Loss due to quantization.

Page 33: A few fundamental concepts in digital electronics

34

Impact of quantization loss

Page 34: A few fundamental concepts in digital electronics

35

Time domain – Frequency domain

Page 35: A few fundamental concepts in digital electronics

36

Ideas in Information Theory and compression

• Is all information created equal? Did you tell me anything if you told me that the Sun rose in the east today?

• What is ASCII code? Compare with a Variable Length Code (VLC)?

• What if monochrome image is to be coded with each pixel being a 0 or a 1 (like in Fax)? Does any possibility to compress come to mind?

Page 36: A few fundamental concepts in digital electronics

37

…ideas in compression contd.

• Eliminating “unnecessary” and less important information.

• Using the probability distribution of symbols to arrive at a more efficient code.

• Regenerating parts of the data from other parts of the data and a difference component.

• Dictionary coding.

Page 37: A few fundamental concepts in digital electronics

38

The END

(only because I don’t know if anyone cares for this stuff)