Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
69 views
in Electronics by (106k points)
closed by

Which of the following computation will take minimum number of clock cycles, if it is implemented on 8051 micro-controller?

Following is variable declaration in c code:

Unsigned int a,b;


1. b = a*a
2. b = a*3
3. b = a/3
4. b = a/4

1 Answer

0 votes
by (103k points)
selected by
 
Best answer
Correct Answer - Option 4 : b = a/4

A 8051 Microcontroller can perform addition, subtraction, left shifting of bits and right shifting of bits. 

When there is a multiplication by nth power of 2, then there is n times left shift.

When there is a division by nth power of 2, then there is n times right shift.

The shifting operations requires the least clock cycles, hence option 4 is the correct answer.

As, there is a division of the square of 2, hence it involves just 2 times right shift. 

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...