I think I have the right answer but it says it's wrong

Discussion in 'Homework Help' started by Steven Jang, Jul 25, 2016.

  1. Steven Jang

    Thread Starter New Member

    Jul 25, 2016
    8
    0
    Bob is designing a digital system to implement the multiplication table. When two single-digit integers (0-9), e.g. 4 and 7, are entered, the system will output their product (28 in this case). When both input and output are expressed in binary, the system should have x bits as input, y bits as output, and z input combinations as don't care conditions. What are the values of (x, y, z)? Enter your answer in the format of (1,3,2) or simply 1, 3, 2.

    I put 4, 7, 6 because since the integers are 0-9 and 2^4=16 then that means the integer has to have 4 bits and for the output, the max is 81, so it is 2^7 so 7 bits and for the don't cares, there are 6 of them because we only need integers 0-9 but we have 4 bits so 10-15 don't matter so there are 6 don't cares for input at least. Sow wtf is wrong with my answer

    ANSWERS APPRECIATED
     
  2. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,934
    383
    You have two input digits...
     
  3. Steven Jang

    Thread Starter New Member

    Jul 25, 2016
    8
    0
    so it's 8, 7, 12?
     
  4. AlbertHall

    Well-Known Member

    Jun 4, 2014
    1,934
    383
    Ummm... Maybe, but:
    Inputs:
    10, 11
    10, 12
    .
    .
    .
    15, 14
    15, 15

    How many attempts do you get?
     
  5. Steven Jang

    Thread Starter New Member

    Jul 25, 2016
    8
    0
    3 per 8 hours
     
  6. Steven Jang

    Thread Starter New Member

    Jul 25, 2016
    8
    0
    8, 7, 12 is wrong
     
  7. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,789
    MOD NOTE: This is definitely homework (or an equivalent). Moved to Homework Help.
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,789
    How many bits does it take to represent all of the possible input values (for one of the inputs) if that input is a t2-digit decimal integer?

    How many bits are required to represent the largest possible product of two 2-digit decimal integers?
     
  9. Steven Jang

    Thread Starter New Member

    Jul 25, 2016
    8
    0
    but the inputs are only single digit decimal integers
     
  10. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,789
    Ah, you are correct. I misread it.

    So I agree that (assuming the two input digits share no bits), that you need 8 input bits and 7 output bits.

    You are significantly underestimating you number of don't care states. Break each digit into two sets -- 10 cares and 6 don't cares. Now keep in mind that you only care if BOTH digits are cares. How many combinations is this? How many total combinations are there for two 4-bit values?
     
  11. Steven Jang

    Thread Starter New Member

    Jul 25, 2016
    8
    0
    so since if just one of the inputs are don't cares that means the entire input is don't care. So would there be 150 don't care inputs?
     
  12. Steven Jang

    Thread Starter New Member

    Jul 25, 2016
    8
    0
    156?
     
  13. MrAl

    Well-Known Member

    Jun 17, 2014
    2,429
    490
    Hi,

    Are you saying that you can input two digits, each from 0 to 9, and need to know the max number of bits of the output?
     
  14. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,687
    900
    I get a smaller number of "don't care" entries, but my focus is on the word "combinations," which ignores the order of selection. Thus, the entries of E*3 and 3*E count as only one combination.

    There are, of course, 6 "don't care" entries that make a combination with any other entry a don't care combination. So the number of don't care entries is >6 and less than 156... How many entries can be made for other entry of the pair?

    John

    Edit: Is 0*F a "don't care" combination? Obviously, the "F" should make it don't care, but the zero will give a correct BCD answer, as will other values for the other entry. While that ambiguity may exist and not be resolved in the question statement, I would consider it is a don't care combination, as one character violates the rules for BCD entry.
     
    Last edited: Jul 26, 2016
  15. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,789
    Correct (as I read things).
     
  16. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,789
    I would see E*3 and 3*E as two different combinations, though I understand what you are saying. Part of my reasoning is that the question leads to the treatment of the two four-bit inputs as a single eight-bit pattern, and 11100011 is a different input combination than 00111110. Also, there is no requirement for E*3 to produce the same output as 3*E, so it seems unreasonable to treat them as a single entry when that is the case.

    I also agree that 0*F is a "don't care". First, a "don't care" input combination isn't one that yields an incorrect output, but rather one in which we simply don't care if the resulting output is correct or not. Second, there is no requirement for 0*F to actually result in an output of 0 -- if the logic minimization results in it giving a different result, then that is perfectly acceptable. An interesting follow-on question once the student has implemented their logic would be to ask how many of the "don't care" input patterns could produce correct output patterns and how many of them actually do.
     
  17. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,687
    900
    I got 96 (6*16) combinations. That is binary A-F = 6 entries that make any other entry "don't care." And, there are 16 other possible 4-bit entries (0 -F).

    John
     
  18. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,789
    If we are counting each possible distinct input combination independently (making 3*E distinct from e*3) then there are a couple of way of counting them up.

    First, there are 256 possible combinations (a total of 8-bits of input). Of those, there are 100 legal combinations (mapping to two single-digit inputs) making the remaining 156 input combinations illegal.

    Second, for the first four bits there are 6 illegal combinations and, for each of them, there are 16 possible combinations of the other four bits, making 96 illegal combinations just from that. However, for the remaining 10 legal combinations of the first for bits, there are 6 illegal combinations of the remaining four bits making an additional 60 illegal combinations, for a total of 156 combinations.

    Third, break each set for four bits into 10 legal and 6 illegal combinations. You then have

    6x6 = 36 combinations in which both digits are illegal
    10x6 = 60 combinations in which only the second digit is illegal
    6x10 = 60 combinations in which only the first digit is illegal

    total = 156 combinations in which at least one digit is illegal.
     
  19. jpanhalt

    AAC Fanatic!

    Jan 18, 2008
    5,687
    900
    Let's see what the instructor wanted.

    John
     
  20. MrAl

    Well-Known Member

    Jun 17, 2014
    2,429
    490
    Hi,

    That sounds reasonable.

    If you have 7 bits that is 0 to 127, 128 possibilities only 100 are used, the 8th bit adds 128 possibilities that are unused, so that's 128+28=156 unused combinations.
     
Loading...