Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is c method?

1004


How can a program be made to print the name of a source file where an error occurs?

1228


Explain the use of keyword 'register' with respect to variables.

1056


What is the correct declaration of main?

1215


Why is not a pointer null after calling free?

1027


Differentiate between a for loop and a while loop? What are it uses?

1189


What are the rules for the identifier?

1171


The statement, int(*x[]) () what does in indicate?

1151


Explain how can you be sure that a program follows the ansi c standard?

1481


Should I learn data structures in c or python?

1028


Explain what is the heap?

1059


What is define c?

1083


When is the “void” keyword used in a function?

1507


What is the difference between typedef struct and struct?

1112


a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion

2782