---
+ Post New Thread
Results 1 to 6 of 6
  1. #1
    Newbie level 5
    Points: 772, Level: 6

    Join Date
    Dec 2008
    Posts
    9
    Helped
    1 / 1
    Points
    772
    Level
    6

    digital circuit and design interview question

    Design a combinational circuit which gives high output when any 2 bits of 8 bit register are high. Can that be extended such that 3 bits 4 bits...etc

    •   Alt20th April 2009, 06:08

      advertising

        
       

  2. #2
    Full Member level 1
    Points: 1,701, Level: 9

    Join Date
    Feb 2009
    Location
    Bangalore
    Posts
    111
    Helped
    24 / 24
    Points
    1,701
    Level
    9

    circuit interview question

    Output <= '1' when (reg(0) + reg(1) + reg(2) + reg(3)
    + reg(4) + reg(5) + reg(6) + reg(7))
    => "00000010" else
    '0';

    I think this will give ans...
    Please correct me if I am wrong.



    •   Alt20th April 2009, 07:01

      advertising

        
       

  3. #3
    Member level 3
    Points: 1,963, Level: 10

    Join Date
    Nov 2003
    Posts
    60
    Helped
    4 / 4
    Points
    1,963
    Level
    10

    Re: Design combinational circuit interview question

    yes, it can be extended.
    for any 2 bits case:
    assign out2 = r0 & ( r1| r2|r3|r4|r5|r6|r7)
    | r1 & ( r2|r3|r4|r5|r6|r7)
    | r2 & ( r3|r4|r5|r6|r7)
    | r3 & ( r4|r5|r6|r7)
    | r4 & ( r5|r6|r7)
    | r5 & ( r6|r7)
    | r6 & ( r7)



    •   Alt20th April 2009, 08:41

      advertising

        
       

  4. #4
    Newbie level 5
    Points: 772, Level: 6

    Join Date
    Dec 2008
    Posts
    9
    Helped
    1 / 1
    Points
    772
    Level
    6

    Design combinational circuit interview question

    Hi
    @ray123
    if my 8 bit reg has 01110000
    then I should get '0' as output
    But ur solution gives '1'
    @shanmugaveld
    ya 2 4-bit full adders will do.
    but can it b more simple.



  5. #5
    Member level 3
    Points: 1,963, Level: 10

    Join Date
    Nov 2003
    Posts
    60
    Helped
    4 / 4
    Points
    1,963
    Level
    10

    Re: Design combinational circuit interview question

    Yes, if 3-bit high case can be treated as the subset of any 2-bit high case, an adder implementation is good enough.



  6. #6
    Full Member level 5
    Points: 3,287, Level: 13

    Join Date
    Dec 2004
    Location
    Munich, Germany
    Posts
    243
    Helped
    46 / 46
    Points
    3,287
    Level
    13

    Design combinational circuit interview question

    You can also traditional approach of k-map, if you don't like to use adders in your logic.

    Split your 8-bit bus to two 4-bit busses, for each four bit bus, try to find exactly one 1's, exactly 2 1's and exactly 0 1's anthen u need to simply form the logic for 0+2, 2+0 and 1+1

    The same procedure can be applied to if you want find for three 1's inside your 8-bit bus that would be : 0+3,3+0,1+2,2+1



+ Post New Thread
Please login