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.

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

Status
Not open for further replies.

pooja_khubbar

Newbie level 6
Newbie level 6
Joined
Nov 25, 2010
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,377
hello friends
can anyone tell me two 4bit numbers....whose multiplication leads to maximum no of 1s in output.
 

lostinxlation

Advanced Member level 2
Advanced Member level 2
Joined
Aug 19, 2010
Messages
699
Helped
197
Reputation
394
Reaction score
183
Trophy points
1,323
Location
San Jose area
Activity points
5,051
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:

betwixt

Super Moderator
Staff member
Advanced Member level 7
Joined
Jul 4, 2009
Messages
15,732
Helped
5,069
Reputation
10,163
Reaction score
4,924
Trophy points
1,393
Location
Aberdyfi, West Wales, UK
Activity points
133,230
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.
 

lostinxlation

Advanced Member level 2
Advanced Member level 2
Joined
Aug 19, 2010
Messages
699
Helped
197
Reputation
394
Reaction score
183
Trophy points
1,323
Location
San Jose area
Activity points
5,051
your answer is correct for a 4-bit result.
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:

FvM

Super Moderator
Staff member
Advanced Member level 7
Joined
Jan 22, 2008
Messages
50,813
Helped
14,603
Reputation
29,481
Reaction score
13,688
Trophy points
1,393
Location
Bochum, Germany
Activity points
290,950
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.
 

pooja_khubbar

Newbie level 6
Newbie level 6
Joined
Nov 25, 2010
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,377
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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top