49
Software Developers View of Hardware Electronic Circuits

Electronic Circuits

  • Upload
    gavhays

  • View
    4.460

  • Download
    9

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Electronic  Circuits

Software Developers View of Hardware

Electronic Circuits

Page 2: Electronic  Circuits

What are circuits?

Computers are electrical devices, so therefore all functions performed by a computer need to done via the use of circuits.

Circuits are designed via the use of Logic Gates which show the path and the way in which electronic signals are sent and received.

Page 3: Electronic  Circuits

Logic Gates

Are a hardware circuit that produces a 0 or 1, which is normally an electronic impulse.

There are THREE basic logic gates and THREE extended gates that can be used to build integrated circuits.

Page 4: Electronic  Circuits

BASIC GATES

1. NOT Gate This is the simplest of all gates, it involves a

single input and a single output. The purpose of this gate is the flipping of a bit

similar to what is performed in one’s complement.

Page 5: Electronic  Circuits

NOT Gate

0 1A X

Page 6: Electronic  Circuits

NOT Gate

Page 7: Electronic  Circuits

NOT Gate

Page 8: Electronic  Circuits

NOT Gate – Truth Table

A X

0 1

1 0

IF A = 0 THEN

X = 1

ELSE

X = 0

ENDIF

Page 9: Electronic  Circuits

BASIC GATES

2. AND Gate This is involves two inputs to produce one

output. Both inputs must be true for the output to be true.

Page 10: Electronic  Circuits

AND Gate

A

X

B

Page 11: Electronic  Circuits

AND Gate

Page 12: Electronic  Circuits

AND Gate

Page 13: Electronic  Circuits

AND Gate

Page 14: Electronic  Circuits

AND Gate – Truth Table

A B X

0 0 0

0 1 0

1 0 0

1 1 1

IF A=1 AND B=1THEN

X = 1

ELSE

X = 0

ENDIF

Page 15: Electronic  Circuits

BASIC GATES

3. OR Gate This is involves two inputs to produce one

output. If either inputs are true then the output will be

true.

Page 16: Electronic  Circuits

OR Gate

A

X

B

Page 17: Electronic  Circuits

OR Gate

Page 18: Electronic  Circuits

OR Gate

Page 19: Electronic  Circuits

OR Gate

Page 20: Electronic  Circuits

OR Gate

Page 21: Electronic  Circuits

OR Gate – Truth Table

A B X

0 0 0

0 1 1

1 0 1

1 1 1

IF A=1 OR B=1THEN

X = 1

ELSE

X = 0

ENDIF

Page 22: Electronic  Circuits

Activity 1

Complete the truth table for the following circuit.

A

B

YX

Page 23: Electronic  Circuits

Truth Table

A B X Y

0 0

0 1

1 0

1 1

Page 24: Electronic  Circuits

EXTENDED GATES

1. NAND Gate This is involves two inputs to produce one

output. The output is the opposite of an AND gate. Is a combination of an AND and NOT gate.

Page 25: Electronic  Circuits

NAND Gate

A

X

B

Page 26: Electronic  Circuits

NAND Gate – Truth Table

A B X

0 0 1

0 1 1

1 0 1

1 1 0

IF A=1 AND B=1THEN

X = 0

ELSE

X = 1

ENDIF

Page 27: Electronic  Circuits

EXTENDED GATES

2. NOR Gate This is involves two inputs to produce one

output. The output is the opposite of an OR gate. It is a combination of an OR and NOT.

Page 28: Electronic  Circuits

NOR Gate

A

X

B

Page 29: Electronic  Circuits

NOR Gate – Truth Table

A B X

0 0 1

0 1 0

1 0 0

1 1 0

IF A=1 AND B=1THEN

X = 0

ELSE

X = 1

ENDIF

Page 30: Electronic  Circuits

EXTENDED GATES

3. XOR Gate This stands for exclusive OR. This gate is true if only one input is true.

Page 31: Electronic  Circuits

XOR Gate

A

X

B

Page 32: Electronic  Circuits

XOR Gate – Truth Table

A B X

0 0 0

0 1 1

1 0 1

1 1 0

Page 33: Electronic  Circuits

SPECIALITY CIRCUITS

Designed to make use of our binary knowledge and our circuitry knowledge

Examples include: Adders Flip Flops Shifts

Page 34: Electronic  Circuits

DESIGNING SPECIALITY CIRCUITS

These circuits are written to provide a specific function: Adder (Binary Addition) Flip Flop (Binary Storage)

Page 35: Electronic  Circuits

DESIGNING SPECIALITY CIRCUITS

Follow these steps: Identify inputs and outputs Identify the components required to produce the

output (AND, OR, NOT, NAND, NOR, XOR) Construct the solution with logic gates Check the solution for validity (with a truth table) Evaluate the circuit design (could you make this

circuit better by chaining different logic gates)

Page 36: Electronic  Circuits

Binary Half Adder

This device is basically a calculator. Lets look at the half adder truth table first.

Page 37: Electronic  Circuits

Binary Half Adders

To create a Binary Adder, we need to find a logic gate that give us the Carry output and a logic gate the Sum output

INPUT OUTPUT

A B Carry Sum

0 0 0 0

0 1 0 1

1 0 0 1

1 1 1 0

Page 38: Electronic  Circuits

Binary Half Adders

Carry output is created using a

INPUT OUTPUT

A B Carry Sum

0 0 0 0

0 1 0 1

1 0 0 1

1 1 1 0

AND logic gate

AX

B

Page 39: Electronic  Circuits

Binary Half Adders

Sum output is created using a

INPUT OUTPUT

A B Carry Sum

0 0 0 0

0 1 0 1

1 0 0 1

1 1 1 0

XOR logic gate

AX

B

Page 40: Electronic  Circuits

The circuit:

Binary Half Adders

A

B

Carry (C)

Sum (S)

Page 41: Electronic  Circuits

Half And Full Adders

Half Adders only work to add two digits To add more than 2 binary digits we need a full

adder A full adder allows us to add the “carry” value to

an binary addition

Page 42: Electronic  Circuits

Full Adders

A

B

Carry (C)

Sum (S)

Carry in

Page 43: Electronic  Circuits

Truth Tables

Construct a truth table for the full adder.

Page 44: Electronic  Circuits

Truth Table

A B CARRY IN

CARRY SUM

0 0 0 0 0

0 0 1 0 1

0 1 0 0 1

0 1 1 1 0

1 0 0 0 1

1 0 1 1 0

1 1 0 1 0

1 1 1 1 1

Page 45: Electronic  Circuits

Circuit Design Steps

Identify inputs and outputs.

A + B + C = X Identify the components needed to obtain

the desired output.

AND/OR/NOT/XOR/NAND/NOR Construct a truth table to test.

Page 46: Electronic  Circuits

Activity 2

Construct a truth table for the following circuit.

YAB X

C

Page 47: Electronic  Circuits

A B C Y X0 0 0 1 10 0 1 1 00 1 0 1 10 1 1 1 01 0 0 1 11 0 1 1 01 1 0 0 01 1 1 0 1

AB X

C

Page 48: Electronic  Circuits

Activity 3

Page 49: Electronic  Circuits

Fault Door Switch x Light0 0 0 00 0 1 00 1 0 00 1 1 11 0 0 01 0 1 01 1 0 01 1 1 0