Difference between revisions of "CSC103: DT's Notes 1"
Line 892: | Line 892: | ||
==Building a Two-Bit Adder with Logic Gates== | ==Building a Two-Bit Adder with Logic Gates== | ||
− | |||
− | + | Designing the ''schematics'' for an electronic circuit from boolean function is very easy once we do a few examples: | |
− | + | For example, imagine that we have a boolean function ''f'' of two variables ''a'' and ''b'' equal to: | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ::: ''f'' = ''a'' AND ( NOT ''b'' ) | ||
+ | |||
+ | To implement it with logic gates we make ''a'' and ''b'' inputs, and ''f'' the output of the circuit. Then ''b'' is fed into an inverter gate (NOT), and the output of the inverter into the input of an AND gate. The other input of the AND gate is connected to the ''a'' signal, and the output becomes ''f''. | ||
+ | <br /> | ||
+ | <center>[[Image:aANDNOTb.png|150px]]</center> | ||
<br /> | <br /> |
Revision as of 21:40, 16 September 2013
--© D. Thiebaut 08:10, 30 January 2012 (EST)