Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Design combinational circuit interview question

Status
Not open for further replies.

venkatreddydec30

Newbie level 5
Joined
Dec 10, 2008
Messages
9
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,377
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
 

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.
 

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)
 

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.
 

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

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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top