Give a fast way to multiply a number by 7
Answer Posted / pratik chopra
It is very obvious above condition will not work if output
after multiplying by 7 is not 8 bit. In that case, if you
consider 64*7=448 which is 111000000 and a 9bit number.
Thus, there is an overflow. Even a normal decimal
calculation, restricted to 8 bit will not give a right answer.
In other words, any n-bit number whose multiplication with 7
is an n-bit number, the above solution will work otherwise,
overflow will occur.
For 8 bit no. max x<=(255/7)<=36.
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
Do you know pointer in c?
What is a 'null pointer assignment' error?
I need previous papers of CSC.......plz help out by posting them.......
Tell me about low level programming languages.
How can I invoke another program or command and trap its output?
Explain what is the advantage of a random access file?
How many identifiers are there in c?
What does do in c?
What does %2f mean in c?
What is wrong with this program statement?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
Is null equal to 0 in sql?
Where can I get an ansi-compatible lint?
code for replace tabs with equivalent number of blanks
hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell