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.

Count the number of 1's

Status
Not open for further replies.
use wallice tree technique for designing the hardware here

divide the 32 bits into parts
3+3+3......................+3+2

then add
3+3+3 bits=
.......
........
....

then in the end add all of the results
 

Dear echo47

what I am thinking is like this.

divide the 32 bit stream into 16 parts , where each part has 2 bits.

Initially we will operate on two bits only.

For this let us assume that we are feeding these two bits to half adder. then

Bits
ab s c Ones
00 0 0 0
01 1 0 1
10 1 0 1
11 0 1 2

so if we half add two bits and if output is
00 then there is no 1 present
10 then only one 1 present
01 then two ones present.

If we continue this iteratively , I think we can complete the task by gates only.

regards
 

register
when u r making it, make it bit addressable

if register is bit addressable then take the 'OR' function of all the bits of register result is ur desired output
 

Hi anoop12, It will require a lot more than 16 AND and 16 XOR gates to complete your structure.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top