Difference between revisions of "CSC103: DT's Notes 1"

From dftwiki3
Jump to: navigation, search
Line 892: Line 892:
  
 
==Building a Two-Bit Adder with Logic Gates==
 
==Building a Two-Bit Adder with Logic Gates==
Shannon in 1948 wrote a Master's thesis at MIT that provided one of the major breakthroughs of the 20th century for computer science, and because computers are so important tools in science, for all of science.  Shannon discovered that binary arirthmetic  such as the binary addition could be performed using logic gates.
 
  
The first step in figuring out how is to use a ''code'', and associate '''1''' with '''true''' and '''0''' with '''false'''.  In this case the truth table for the '''AND''' operator can be expressed with 1s and 0s the same way it was with true and false:
+
Designing the ''schematics'' for an electronic circuit from boolean function is very easy once we do a few examples:
  
{| border="1" cellpadding="10" cellspacing="0"
+
For example, imagine that we have a boolean function ''f'' of two variables ''a'' and ''b'' equal to:
! a
 
! b
 
! a '''and''' b
 
|-
 
|
 
0/F
 
|
 
0/F
 
|
 
0/F
 
|-
 
|
 
0/F
 
|
 
1/T
 
|
 
0/F
 
|-
 
|
 
1/T
 
|
 
0/F
 
|
 
0/F
 
|-
 
|
 
1/T
 
|
 
1/T
 
|
 
1/T
 
|}
 
  
 +
::: ''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)



This section is only visible to computers located at Smith College













.