home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / electron / 18939 < prev    next >
Encoding:
Text File  |  1992-11-15  |  2.6 KB  |  73 lines

  1. Newsgroups: sci.electronics
  2. Path: sparky!uunet!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmssyd.syd.dms.CSIRO.AU!metro!sunb!macadam!johnh
  3. From: johnh@macadam.mpce.mq.edu.au (John Haddy)
  4. Subject: Re: Logic Addition
  5. Message-ID: <1992Nov15.234707.9734@mailhost.ocs.mq.edu.au>
  6. Sender: johnh@macadam (John Haddy)
  7. Nntp-Posting-Host: macadam.mpce.mq.edu.au
  8. Organization: Macquarie University, Sydney
  9. References:  <#-t1l#n@rpi.edu>
  10. Date: Sun, 15 Nov 1992 23:47:07 GMT
  11. Lines: 60
  12.  
  13. In article <#-t1l#n@rpi.edu>, wilusd@cary115.its.rpi.edu (David John Wilusz) writes:
  14. |> 
  15. |>     Perhaps sci.electronics is not the place for this, but where is?  
  16. |>    Could someone give me the configuration of gates that allows binary
  17. |>    numbers to be correctly added?
  18. |>     Thanks for any help...
  19. |> 
  20. |>     Dave
  21. |> 
  22.  
  23.  
  24. The best way for many applications is to use an ALU chip, such as a 74381; or a
  25. 27283 full adder.
  26.  
  27. Otherwise, an adder may be implemented in a bit slice fashion, with a series of
  28. 1 bit adders strung together. This leads to problems with ripple carry times if
  29. your application requires high speed, so you'll have to design an N bit full
  30. adder from the ground up if your timing is critical, or use a look-ahead carry
  31. generator (also standard TTL).
  32.  
  33. However, assuming that the bit-slice implementation fills your needs:
  34.  
  35.       Carry               Carry
  36.        In    | Inp A    | Inp B    ||  Out    | Output
  37.        Ci    |   A    |   B    ||    |
  38.     =========================================
  39.        0    |   0    |   0    ||   0    |   0
  40.        0    |   0    |   1    ||   0    |   1
  41.        0    |   1    |   0    ||   0    |   1
  42.        0    |   1    |   1    ||   1    |   0
  43.        1    |   0    |   0    ||   0    |   1
  44.        1    |   0    |   1    ||   1    |   0
  45.        1    |   1    |   0    ||   1    |   0
  46.        1    |   1    |   1    ||   1    |   1
  47.  
  48. The carry out from bit N feeds to the adder for bit N+1. Obviously, in bit
  49. position 0, there is no carry in, so the adder can be reduced to what is known as
  50. a half adder.
  51.  
  52. Half Adder:    Out    = A xor B
  53.         Carry    = A and B
  54.  
  55. Full Adder:    Out    = (A xor B) xor Ci
  56.         Carry    = (A and B) or (A and Ci) or (B and Ci)
  57.  
  58. Gate level implementation depends on what you have around. Refer to Horowitz and
  59. Hill for examples of implementations of the XOR function.
  60.  
  61. JohnH
  62.  
  63. ----------------------------------------------------------------------------
  64.  
  65.       |  _  |_   _   |_|  _   _|  _|              Electronics Department
  66.     |_| (_) | | | |  | | (_| (_| (_| \/           School of MPCE
  67.     ---------------------------------/-           Macquarie University
  68.                                                   Sydney, AUSTRALIA 2109
  69.  
  70.     Email: johnh@mpce.mq.edu.au, Ph: +61 2 805 8959, Fax: +61 2 805 8983
  71.  
  72. ----------------------------------------------------------------------------
  73.