# Logic circuit to detect error(basic problem)

#### SmallRedMachine

Joined Feb 25, 2017
48
Hi, I'm doing a basic digital electronic assignment and I'm stuck on the last part of it, it's about Truth Tables, K-maps and Boolean expressions. This is the problem:
"In order to detect any malfunction in the calculator, design a logic circuit which will detect if the calculator has output in error any of the six 4-bit values that you have NOT used in your own personal unweighted BCD code. Obtain the circuit in its SIMPLEST form and give its Boolean equation and gate level circuit diagram."
I have the six 4-bit binary values and I have no idea how I can design this logic circuit , I was going to set each of their output to "1" indicating it's an error like:
A B C D F
0 0 0 0 1
0 1 0 0 1
1 0 0 0 1
1 1 0 0 1
1 1 1 1 1

And then do a K-map based on the above truth table but then I thought this is not making any sense at all, I think the solution must be very simple because they just started teaching these stuff in the Foundation course I'm studying. Could someone please give me a clue what I should do ? Thank you.

#### SmallRedMachine

Joined Feb 25, 2017
48
Please note the F column is the output.

#### MrChips

Joined Oct 2, 2009
30,442
Do you know how to draw Karnaugh maps?

For 4-bit logic, draw the truth-table of all 16 combinations. Fill in the 0s, 1s, and Xs in the table.
Then draw the Karnaugh map.

#### dl324

Joined Mar 30, 2015
16,662
Welcome to AAC!

What you've drawn shows F always HIGH. For starters, draw the complete truth table.

The problem says to generate an error for the 6 values not used in your code, but you only show 5.

#### WBahn

Joined Mar 31, 2012
29,837
Hi, I'm doing a basic digital electronic assignment and I'm stuck on the last part of it, it's about Truth Tables, K-maps and Boolean expressions. This is the problem:
"In order to detect any malfunction in the calculator, design a logic circuit which will detect if the calculator has output in error any of the six 4-bit values that you have NOT used in your own personal unweighted BCD code. Obtain the circuit in its SIMPLEST form and give its Boolean equation and gate level circuit diagram."
I have the six 4-bit binary values and I have no idea how I can design this logic circuit , I was going to set each of their output to "1" indicating it's an error like:
A B C D F
0 0 0 0 1
0 1 0 0 1
1 0 0 0 1
1 1 0 0 1
1 1 1 1 1

And then do a K-map based on the above truth table but then I thought this is not making any sense at all, I think the solution must be very simple because they just started teaching these stuff in the Foundation course I'm studying. Could someone please give me a clue what I should do ? Thank you.
If the assignment is on truth tables, K-maps, and Boolean expressions, then making a truth table from the desired behavior, doing a K-map based on that truth table, and then coming with the "simplest" Boolean expression from that would seem to be about as simple as they could make the problem and have it address the topics it is supposed to cover.

As has already been pointed out, you only have five values in your table. Also, you might be tempted to consider the remaining values "don't cares", but are they? If you use one of the values has been used, do you care if F is HI or LO?

#### SmallRedMachine

Joined Feb 25, 2017
48
Welcome to AAC!

What you've drawn shows F always HIGH. For starters, draw the complete truth table.

The problem says to generate an error for the 6 values not used in your code, but you only show 5.
Oh sorry I missed one, it's 1 1 0 1.
I already did the complete truth table that consist of nine 4-bit binary values which we had to generate based on our own unique student number, for 9 to 15 I put the combinations that I didn't use and used them as don't care conditions for the calculator. Now I'm really confused because those 6 values were used as don't care conditions and now I am supposed to design this logic circuit which will detect them. I know how to do K-maps and get the Boolean expression, these concepts are very new to me and I don't know what I should do next.
I have already got the Boolean expression for each 7 segment of the calculator.

Last edited:

#### WBahn

Joined Mar 31, 2012
29,837
Oh sorry I missed one, it's 1 1 0 1.
I already did the complete truth table that consist of nine 4-bit binary values which we had to generate based on our own unique student number, for 9 to 15 I put the combinations that I didn't use and used them as don't care conditions for the calculator. Now I'm really confused because those 6 values were used as don't care conditions and now I am supposed to design this logic circuit which will detect them. I know how to do K-maps and get the Boolean expression, these concepts are very new to me and I don't know what I should do next.
I have already got the Boolean expression for each 7 segment of the calculator.
If you have 6 combinations that you aren't supposed to use, then that leaves ten (not nine) that you should be using.

I think I see your confusion. Perhaps this will help.

You have sixteen possible codes, of which you are using ten for your calculator. IF one of the remaining six codes is used, you don't care what the output of the calculator is because the input is garbage to begin with. So, to simplify the logic expressions, you treat them as don't cares for the purposes of your calculator logic. However, that does not mean that you don't want to be alerted that your calculator has received invalid data since your calculator is going to output something in response to garbage data and you don't want to mistakenly use that thinking that nothing is wrong.

#### dl324

Joined Mar 30, 2015
16,662
I already did the complete truth table that consist of nine 4-bit binary values which we had to generate based on our own unique student number, for 9 to 15 I put the combinations that I didn't use and used them as don't care conditions for the calculator.
Do you think that truth table can be used for this problem? Wasn't it used for the solution of a different, albeit related, problem?

#### SmallRedMachine

Joined Feb 25, 2017
48
If you have 6 combinations that you aren't supposed to use, then that leaves ten (not nine) that you should be using.

I think I see your confusion. Perhaps this will help.

You have sixteen possible codes, of which you are using ten for your calculator. IF one of the remaining six codes is used, you don't care what the output of the calculator is because the input is garbage to begin with. So, to simplify the logic expressions, you treat them as don't cares for the purposes of your calculator logic. However, that does not mean that you don't want to be alerted that your calculator has received invalid data since your calculator is going to output something in response to garbage data and you don't want to mistakenly use that thinking that nothing is wrong.
Yes you are right, I checked my table again and indeed I have used the ten codes. Thanks for the explanation that cleared what's going on here, though I'm still not sure how I can go about designing the logic circuit that will detect them.

#### SmallRedMachine

Joined Feb 25, 2017
48
Do you think that truth table can be used for this problem? Wasn't it used for the solution of a different, albeit related, problem?
These six unused codes are already in my K-maps as don't cares "d", what I was thinking I could do was to pair them together like 1s and then get the Boolean expression from them ? Does this make any sense ?

#### dl324

Joined Mar 30, 2015
16,662
I'm still not sure how I can go about designing the logic circuit that will detect them
Post your work and your best effort so we can see where to guide you.

#### dl324

Joined Mar 30, 2015
16,662
These six unused codes are already in my K-maps as don't cares "d", what I was thinking I could do was to pair them together like 1s and then get the Boolean expression from them ? Does this make any sense ?
That's one way to do it, but the correct way is to draw an appropriate truth table, and generate the Kmap.

#### SmallRedMachine

Joined Feb 25, 2017
48
That's one way to do it, but the correct way is to draw an appropriate truth table, and generate the Kmap.
Thanks glad to know I'm getting somewhere with this, now would it be correct if I write my 15 codes again in the truth table and put 0 as output for the first ten codes and 1 for the six unused codes(don't cares). What I'm thinking is that 0 output means ignore and 1 means error detected, then draw the K-map and get the Boolean expression.

#### dl324

Joined Mar 30, 2015
16,662
would it be correct if I write my 15 codes again in the truth table and put 0 as output for the first ten codes and 1 for the six unused codes(don't cares).
Do you mean 16 codes?
What I'm thinking is that 0 output means ignore and 1 means error detected, then draw the K-map and get the Boolean expression.
The zeros aren't ignores, they mean no error. But you appear to have the general idea now.

#### SmallRedMachine

Joined Feb 25, 2017
48
Do you mean 16 codes?
The zeros aren't ignores, they mean no error. But you appear to have the general idea now.
Right I keep forgetting to count the code for number "zero".
Thanks a lot for the clues, never thought I would be helped this quickly, really appreciate it.

#### dl324

Joined Mar 30, 2015
16,662
Thanks a lot for the clues, never thought I would be helped this quickly, really appreciate it.
Your welcome. Thanks for understanding that we won't simply give answers for homework. It doesn't help the requester learn.

If you look at some of the other threads in Homework, you'll see that progress is usually dictated by the student. Many give up when they come to understand that we won't just give them answers and abandon the thread.

#### WBahn

Joined Mar 31, 2012
29,837
Don't make it harder than it is. At the end of the day you have a truth table with some 0's and some 1's and you want to use a K-map to come up with a Boolean expression that uses as few terms as possible to implement that table. The first step (coming up with the table) is the only step that is directly related to the logic of the problem you are trying to solve. Once you have the table, you could give it to someone else to make the K-map and come up with the Boolean expression without ever telling them anything about what logic that table implements.