+ Post New Thread

Results 1 to 6 of 6

- 20th April 2009, 06:08 #1

- 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

- 20th April 2009, 06:08

- 20th April 2009, 07:01 #2

- Join Date
- Feb 2009
- Location
- Bangalore
- Posts
- 111
- Helped
- 24 / 24
- Points
- 1,991
- Level
- 10

## 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.

- 20th April 2009, 07:01

- 20th April 2009, 08:41 #3

- Join Date
- Nov 2003
- Posts
- 60
- Helped
- 6 / 6
- 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)

- 20th April 2009, 08:41

- 21st April 2009, 13:36 #4

- 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.

- 22nd April 2009, 05:00 #5

- Join Date
- Nov 2003
- Posts
- 60
- Helped
- 6 / 6
- 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.

- 22nd April 2009, 05:00

- 22nd April 2009, 06:15 #6

- 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