Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science –...

21
Carpe Gates!!!!... & Diem Data CSCI 255 Digital Gates Damian Valles, PhD - Computer Science – Montana Tech http://img.deusm.com/programmableplanet/2012/06/246072/173837_783569.gif

Transcript of Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science –...

Page 1: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

Carpe Gates!!!!...

& Diem DataCSCI 255

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

http://img.deusm.com/programmableplanet/2012/06/246072/173837_783569.gif

Page 2: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• Previous notes (and class), we have covered the BIG 3

� AND, OR, NOT

• We will look in how to derive other digital gates

� NOR,

� NAND,

� XOR,

� MUXes,

� Decoders….

http://www.csd.uoc.gr/~hy534/05a/s23_ts.html

Page 3: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• NOR Gate

• Gate representation of an OR-gate with a complemented output

• Gate diagram & Truth table:

X

Y

������ � � � � � ��′

NOR-GATE

INPUT 1 (X-value) INPUT 2 (Y-value) OUTPUT (x NOR y)

0 0 1

0 1 0

1 0 0

1 1 0

X

Y

Page 4: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• NOR Gate(s) as:

� NOT Gate

� AND Gate

� OR Gate

NOR-GATE

Page 5: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• NAND Gate

• Gate representation of an AND-gate with a complemented output

• Gate diagram & Truth table:

X

Y������ � � • � � � � �′

NAND-GATE

INPUT 1 (X-value) INPUT 2 (Y-value) OUTPUT (x NAND y)

0 0 1

0 1 1

1 0 1

1 1 0

X

Y

Page 6: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• NAND Gate(s) as:

� NOT Gate

� AND Gate

� OR Gate

NAND-GATE

Page 7: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• Exclusive-OR Gate (aka XOR)

• XOR is true when the inputs are exclusively different, false when the same

• Gate diagram:

X

Y

������ � �⨁� � �� � ��

XOR-GATE

INPUT 1 (X-value) INPUT 2 (Y-value) OUTPUT (x XOR y)

0 0 0

0 1 1

1 0 1

1 1 0

Page 8: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• What happens when applying DeMorgan’s to the XOR???

�⨁� � �� � ��

XOR-GATE

Complement variables and the

operation in relation to them

Complement : OR -> AND

�⨁� � X � Y� X � Y� “AND”-it out, (Distribute)

�⨁� � XX � XY � YX � YY′ Apply Theorem 5D

�⨁� � X′Y � YX …this can be useful…

Page 9: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• Multiplexers – (aka MUXes): “Select the input you want” -- me again

• MUXes come in different sizes, with three major components

• Input lines

• Single Output line

• Selection lines

• The selection lines must satisfy:

������������������ � 2�� !"#$%&"'"()*$�+*�",

• Simple 2-to-1 MUX:

MUXes

2-to-1

MUX

Input0

Input1

Output

Select0

Page 10: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• How does it work??

MUXes

Input0 = 1

Input1 = 0

Output = 1

Select0 = 0

When Select line = 0; Value of

Input0 with go through the

Output line

Input0 = 1

Input1 = 0

Output = 0

Select0 = 1

When Select line = 1; Value of

Input1 with go through the

Output line

Page 11: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• 4-to-1 MUX:

MUXes

Input0

Input1Output

Select0

Input2

Input3

Select1

Select (Sel1:Sel0) OUTPUT

00 Input0

01 Input1

10 Input2

11 Input3

Page 12: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• Demultiplexers – (aka Demuxes): “Select the output you want” -- me

again

• Three major components

• Input line

• Output lines

• Selection lines

• The selection lines must satisfy:

������������������� � 2�� !"#$%&"'"()*$�+*�",

• Simple 1-to-2 Demux:

Demux

1-to-2

Demux

Output0

Output1Input

Select0

Page 13: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• How does it work??

Output0 = 1

Output1

Input = 1

Select0 = 0

When Select line = 0; Value of

Input with go through the

Output0 line; other output lines

do not have values

Select0 = 1

When Select line = 1; Value of

Input with go through the

Output1 line; other output lines

do not have values

Demux

Output0

Output1 = 0

Input = 0

Page 14: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• 1-to-4 Demux:

Output0

Output1Input

Select0

Output2

Output3

Select1

Select

(Sel1:Sel0)

OUTPUT0 OUTPUT1 OUTPUT2 OUTPUT3

00 Input Z Z Z

01 Z Input Z Z

10 Z Z Input Z

11 Z Z Z Input

Demux

Z-value: High Impedance

Page 15: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• Decoder : “Decode the incoming information in order to provide the

whole message” -- me again

• Decoders are mainly designed & utilized for RAM memory management

• Address & Data lines

• Decoders have a design that satisfies:

��������-.�.����� � 2�� !"#$%/00#",,+*�",

• Simple 1-to-2 Decoder:

Decoder

Data0 (D0)Address 0 (A0)

1-to-2

Dec Data1 (D1)

Page 16: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• How does it work??

When address line = 0; First data

line is true; while all other data

lines are false

Decoder

D0 = 1A0 = 0

1-to-2

Dec D1 = 0

D0 = 0A0 = 1

1-to-2

Dec D1 = 1

When address line = 1; Second

data line is true; while all other

data lines are false

Page 17: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• 2-to-4 Demux:

A1 A0 D3 D2 D1 D0

0 0 0 0 0 1

0 1 0 0 1 0

1 0 0 1 0 0

1 1 1 0 0 0

Decoder

D0

A0 2-to-4

Dec

D1

A1 D2

D3

Page 18: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• Encoder : “Duh, the opposite of the decoder….” -- me again

• Also, mainly designed & utilized for RAM memory management

• Address & Data lines

• Encoders have a design that satisfies:

��������122��������� � 2�� !"#$%34)4+*�",

• Simple 2-to-1 Decoder:

Encoder

Data0 (D0)Address 0 (A0)

2-to-1

EncAddress 1 (A1)

Page 19: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• How does it work??

The data line value (zero) points

to the address line which is true

(A0); other address lines are false

D0 = 0A0 = 1 2-to-1

Enc

2-to-1

Enc

Encoder

A1 = 0

A0 = 0

A1 = 1D0 = 1

The data line value (one) points

to the address line which is true

(A1); other address lines are false

Page 20: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

• 2-to-4 Demux:

A3 A2 A1 A0 D1 D0

0 0 0 1 0 0

0 0 1 0 0 1

0 1 0 0 1 0

1 0 0 0 1 1

D0

A0

4-to-2

EncD1

A1

Encoder

A2

A3

Page 21: Carpe Gates!!!! & Diem Data Gates.pdf · Digital Gates Damian Valles, PhD - Computer Science – Montana Tech • Exclusive-OR Gate (aka XOR) • XOR is true when the inputs are exclusively

D i g i t a l G a t e s

D a m i a n V a l l e s , P h D - C o m p u t e r S c i e n c e – M o n t a n a T e c h

Gates OUT!!!!!

http://static4.businessinsider.com/image/5177

00336bb3f7394f000008-480/psy-bill-gates.jpg