Pergunta de entrevista da empresa Marvell Technology

How many data bits needed to represent A*B+C, all are 8 bit unsigned

Respostas da entrevista

Sigiloso

3 de mar. de 2015

15bits is enough [0, 2^16-2^8]; 15 bits can represent [0, 2^16-1].

3

Sigiloso

17 de fev. de 2016

16 bit. It is because the worst condition is 0xFF*0xFF+0xFF, it is 0xFF*0x100. Result is 0xFF00.

2

Sigiloso

22 de mai. de 2015

(2^8-1)*(2^8-1)+2^8<2^8*2^8=2^16

2

Sigiloso

5 de jan. de 2016

I think it should be 17 bits . (8+8) bits for '*', +1 bit for "+'.

2