Basic Digital Circuit Problem

In summary, the task at hand is to design a circuit that calculates the Hamming distance between two 5-bit binary numbers. The circuit takes two 5-bit numbers as inputs and returns the number of bits that are different between them as a binary output. The suggested design can make use of AND, OR, NOT, XOR gates, and Full Adders, with a provided link for reference. The use of Full Adders in the circuit may seem unnecessary, but could be utilized by ignoring the Carry-in and Carry-out and just using the Sum output to determine if two bits are the same or different. However, it may be more efficient to use XOR gates instead.
  • #1
fazer2014
8
0

Homework Statement



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.

Homework Equations



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

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!
 
Physics news on Phys.org
  • #2
Try using XOR gates for the first stage. Where could you go from there?
 

1. What is a digital circuit?

A digital circuit is a network of interconnected electronic components that can process and manipulate digital signals or data. It can perform logical operations and store data in binary form, using only two states (on/off, high/low, 1/0) to represent information.

2. What are the basic components of a digital circuit?

The basic components of a digital circuit include logic gates (AND, OR, NOT, etc.), flip-flops, registers, counters, and other digital integrated circuits. These components are interconnected to form a circuit that can perform specific functions based on the input signals.

3. What is the difference between combinational and sequential digital circuits?

Combinational circuits process input signals immediately and produce an output based on the current input. In contrast, sequential circuits have a memory element that allows them to store previous inputs and produce an output based on the current and previous inputs. This allows sequential circuits to perform more complex functions.

4. How do you solve a basic digital circuit problem?

To solve a basic digital circuit problem, you need to understand the logic behind the given circuit and analyze the input and output signals. You can use Boolean algebra or truth tables to simplify the logic and determine the output for a given input. It is also helpful to break down the circuit into smaller parts to better understand its functionality.

5. What are some common applications of digital circuits?

Digital circuits have a wide range of applications in everyday devices such as computers, smartphones, calculators, and digital clocks. They are also used in more complex systems like control units in cars, communication systems, and industrial automation. Digital circuits are essential in processing and storing data in various forms, making them a crucial part of modern technology.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
5
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
17K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
771
  • Programming and Computer Science
Replies
1
Views
652
  • Engineering and Comp Sci Homework Help
Replies
2
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
5K
  • Set Theory, Logic, Probability, Statistics
2
Replies
45
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
34
Views
2K
Back
Top