Loading...
Engaged Employer
How many data bits needed to represent A*B+C, all are 8 bit unsigned
Anonymous
15bits is enough [0, 2^16-2^8]; 15 bits can represent [0, 2^16-1].
16 bit. It is because the worst condition is 0xFF*0xFF+0xFF, it is 0xFF*0x100. Result is 0xFF00.
(2^8-1)*(2^8-1)+2^8<2^8*2^8=2^16
I think it should be 17 bits . (8+8) bits for '*', +1 bit for "+'.
Check out your Company Bowl for anonymous work chats.
Get actionable career advice tailored to you by joining more bowls.
Stay ahead in opportunities and insider tips by following your dream companies.
Get personalized job recommendations and updates by starting your searches.