1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Basic Digital Circuit Problem

  1. Oct 29, 2013 #1
    1. The problem statement, all variables and given/known data

    You are to design a circuit that calculates Hamming distance between two 5-bit numbers. It takes two 5-bit binary numbers A4A3A2A1A0 and B4B3B2B1B0 as inputs and reurns the number of bits that are different between the two numbers as binary output O2O1O0.

    For example:
    If the two numbers were 10111 and 00001 then the output would be 011 as there are 3 bits different between them.

    Design a circuit for the Hamming distance calculator. Your design can make use of AND, OR, NOT, XOR gates and Full Adders.

    NB. There is a preceeding question 'draw a truth table for a Full Adder' implying that they want us to use Full Adders in the circuit design.

    2. Relevant equations

    Here is a link about Full Adders: http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/fulladd.html

    3. The attempt at a solution

    I have tried to do this question for a few hours now, and it seems easier to do without the Full Adders (though I don't have a solution yet without FAs either). The only way I can think of using the full adders is to ignore the Carry-in and Carry-out and just use the fact that when, for example, A4 and B4 are the same, the Sum output will be 0, and if they are different the Sum output will be 1. This seems pointless and a waste of using Full Adders (inefficient, could just use 2 XOR gates instead of the whole Full Adder).......
    Just a it stuck I guess? Also even if I manage to get some kind of 5-bit output from the Full Adders eg 10001 where the 0's represent which bits are different, how to convert that into the binary number '3' (011)? Thankyou so much!
     
  2. jcsd
  3. Oct 29, 2013 #2

    phinds

    User Avatar
    Gold Member
    2016 Award

    Try using XOR gates for the first stage. Where could you go from there?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Basic Digital Circuit Problem
  1. Basic circuit problem (Replies: 9)

  2. Basic Circuit Problem (Replies: 4)

Loading...