Continue to Site

# two 4bit no. when multiplied results in max no. of 1s

Status
Not open for further replies.

#### pooja_khubbar

##### Newbie level 6
hello friends
can anyone tell me two 4bit numbers....whose multiplication leads to maximum no of 1s in output.

14 x 9 = b'1111110' ? That gives 6 ones.

Brian.

well, your question is incomplete, but at my full discretion to expand your question, I'd say you can get as many 1s as you want by 1111 x 0001. You can get 7 1s, a million 1s or whatever number of 1s you want.

Last edited:
pooja_khubbar

### pooja_khubbar

Points: 2
I overlooked the obvious and yes @lostinxlation you are correct. I assumed the question referred to two 4-bit numbers and an 8-bit answer. The size of the result wasn't specified, your answer is correct for a 4-bit result. It's an interesting question though, I wonder if there is a mathematical formula for maximizing the number of ones in a number when it is the product of two smaller ones. I'n not sure if it would have a practical application, pehaps in parity generating/checking routines.

Brian.

actually, it doesn't matter how many bits the result is expected with. The result of 1111 x 0001 would be full of 1s without 0s regardless of the expected bit width of the result in a certain case. THe problem is OP didn't ask the question properly and both of your answer and my answer are correct, depending on numbering system.

Since I think this is a homework or some assignment, I didn't elaborate it, but I'm sure you understand what I mean by 'numbering system'.

Last edited:

The result of 1111 x 0001 would be full of 1s without 0s regardless of the expected bit width
It seems to me, that signed or unsigned multiply should be specified first.

thanks all..for the reply..in my case am taking unsigned no.... and its not a homework or assignment..am trying to design some multipliers and then i ve to evaluate the performance of dyanmic ckt..and am using simple binary no.s

Status
Not open for further replies.