3
\$\begingroup\$

I am not Electrical engineer but I am taking digital logic classes. I have a homework but I didn't understand how to do it. This is the question :

The temperature control logic accepts an 8-bit code representing measured temperature in binary. The measured temperature is compared with a specific field temperature. Design and draw a logic circuit which produced “1” if these two binary values are equal.

How can I compare if these values are equal? 8-bit means there are 8 inputs? I am really stuck here because nobody showed us similar problems in class. Can anybody help?

\$\endgroup\$
11
  • 1
    \$\begingroup\$ If you know how to detect if a single bit is different from another specific bit then perhaps you can expand that.. how far have you actually gotten on this? \$\endgroup\$ Mar 11 '15 at 12:51
  • 1
    \$\begingroup\$ Note that a equality comparison is not what a controller needs. Can you see why? \$\endgroup\$ Mar 11 '15 at 13:22
  • \$\begingroup\$ @SpehroPefhany I am planning to use XOR gate, when all bits are same result will be 00000000. If I use a inverter, and use AND gate, final result will be 1. Am I thinking correct ? \$\endgroup\$
    – berkc
    Mar 11 '15 at 14:02
  • \$\begingroup\$ @Nick Your thinking is correct, but pay careful attention to Olin's comment about what you actually need to implement a control function. How would you do it manually? \$\endgroup\$ Mar 11 '15 at 14:58
  • \$\begingroup\$ @SpehroPefhany To be honest I am confused about that comment. Why we don't need a aquality comparison? \$\endgroup\$
    – berkc
    Mar 11 '15 at 15:56
3
\$\begingroup\$

Hint #1: Break the problem down into chunks. You have a system with two inputs (a measurement and a value to compare it with) and an output (a single bit). You know that you must compare the measurement and the value, and spit out a single bit indicating if the values are equal. So, at least you know that you need some comparison logic. You should also assume that your reference value is 8 bits since it's not explicitly specified - why complicate things?

Hint #2: Think about how to implement these chunks with hardware. For example, what does 'equal' actually mean? It means that all 8 bits of the measurement must match all 8 bits of the reference value. So, your next task is to figure out how to check those bits one by one, then figure out how to check the results of those checks to see if they all match, which (if you're clever) will be your single output bit.

\$\endgroup\$
2
  • \$\begingroup\$ I will use Exclusive-NOR to check if bits are equal. If both inputs are same, that logic gate will have 1 as result. After that, I will use AND gates to reduce input to single input. Is it correct? \$\endgroup\$
    – berkc
    Mar 11 '15 at 16:10
  • \$\begingroup\$ You will find that there are many correct ways to solve problems. If the output gives you the correct result then it is correct logically, but there may be other solutions that also give the correct value. \$\endgroup\$ Mar 11 '15 at 17:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.