Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
15 years ago

to find out the number of "1"

hi,everyone i need to find out the number of "1" in a input (a), now ,i thik i could add every bit of input (a) to get the resut, just like : assign b=a[0]+a[0]+a[1]+a[2]+a[3]+a[4]; ----...