Microprocessor and Microcontroller Interview Questions: A complete question bank with real-time examples
By Anita Gehlot
()
About this ebook
Book also covers the descriptive questions, multiple-choice questions along with answers which are asked during an interview.
Related to Microprocessor and Microcontroller Interview Questions
Related ebooks
Digital Electronics with Arduino: Learn How To Work With Digital Electronics And MicroControllers Rating: 5 out of 5 stars5/5Hardware Description Language Demystified: Explore Digital System Design Using Verilog HDL and VLSI Design Tools Rating: 0 out of 5 stars0 ratingsThe Art of Assembly Language Programming Using PIC® Technology: Core Fundamentals Rating: 0 out of 5 stars0 ratingsFundamentals of IoT: Get familiar with the building blocks of IoT (English Edition) Rating: 0 out of 5 stars0 ratingsFast and Effective Embedded Systems Design: Applying the ARM mbed Rating: 5 out of 5 stars5/5Programming Techniques using Python: Have Fun and Play with Basic and Advanced Core Python Rating: 0 out of 5 stars0 ratingsPractical MATLAB: With Modeling, Simulation, and Processing Projects Rating: 0 out of 5 stars0 ratingsPIC32 Microcontrollers and the Digilent Chipkit: Introductory to Advanced Projects Rating: 5 out of 5 stars5/5Projects With Microcontrollers And PICC Rating: 5 out of 5 stars5/5LabVIEW – More LCOD Rating: 0 out of 5 stars0 ratingsThe PIC Microcontroller: Your Personal Introductory Course Rating: 1 out of 5 stars1/5SD Card Projects Using the PIC Microcontroller Rating: 0 out of 5 stars0 ratingsProgramming FPGAs: Getting Started with Verilog Rating: 4 out of 5 stars4/5Arduino Made Simple: With Interactive Projects Rating: 0 out of 5 stars0 ratingsLinear Feedback Controls: The Essentials Rating: 0 out of 5 stars0 ratingsC Programming for the Pc the Mac and the Arduino Microcontroller System Rating: 0 out of 5 stars0 ratingsPython for Microcontrollers: Getting Started with MicroPython Rating: 0 out of 5 stars0 ratingsPrinciples of Digital Electronics Rating: 0 out of 5 stars0 ratingsElectronics And Circuit Design Made Easy Rating: 3 out of 5 stars3/5Electrical and Electronic Principles: Volume 3 Rating: 0 out of 5 stars0 ratingsPower Electronics Applied to Industrial Systems and Transports, Volume 2: Power Converters and their Control Rating: 5 out of 5 stars5/5Practical Robotics in C++: Build and Program Real Autonomous Robots Using Raspberry Pi (English Edition) Rating: 0 out of 5 stars0 ratingsPIC Microcontrollers: An Introduction to Microelectronics Rating: 5 out of 5 stars5/5ARM Microcontrollers Programming for Embedded Systems Rating: 5 out of 5 stars5/5Interfacing PIC Microcontrollers: Embedded Design by Interactive Simulation Rating: 0 out of 5 stars0 ratingsEmbedded Systems Design Using the TI MSP430 Series Rating: 0 out of 5 stars0 ratingsProgramming with STM32: Getting Started with the Nucleo Board and C/C++ Rating: 3 out of 5 stars3/5Advanced PIC Microcontroller Projects in C: From USB to RTOS with the PIC 18F Series Rating: 5 out of 5 stars5/5Introduction to Microprocessors and Microcontrollers Rating: 5 out of 5 stars5/5
Electrical Engineering & Electronics For You
How to Diagnose and Fix Everything Electronic, Second Edition Rating: 4 out of 5 stars4/5No Nonsense Technician Class License Study Guide: for Tests Given Between July 2018 and June 2022 Rating: 5 out of 5 stars5/5Beginner's Guide to Reading Schematics, Fourth Edition Rating: 4 out of 5 stars4/5Electrician's Pocket Manual Rating: 0 out of 5 stars0 ratingsDIY Lithium Battery Rating: 3 out of 5 stars3/5The Fast Track to Your Technician Class Ham Radio License: For Exams July 1, 2022 - June 30, 2026 Rating: 5 out of 5 stars5/5THE Amateur Radio Dictionary: The Most Complete Glossary of Ham Radio Terms Ever Compiled Rating: 4 out of 5 stars4/5Electrical Engineering 101: Everything You Should Have Learned in School...but Probably Didn't Rating: 5 out of 5 stars5/5Off-Grid Projects: Step-by-Step Guide to Building Your Own Off-Grid System Rating: 0 out of 5 stars0 ratingsElectricity for Beginners Rating: 5 out of 5 stars5/5Upcycled Technology: Clever Projects You Can Do With Your Discarded Tech (Tech gift) Rating: 5 out of 5 stars5/5Basic Electricity Rating: 4 out of 5 stars4/5The Homeowner's DIY Guide to Electrical Wiring Rating: 5 out of 5 stars5/5Beginner's Guide to Reading Schematics, Third Edition Rating: 0 out of 5 stars0 ratingsRaspberry Pi Projects for the Evil Genius Rating: 0 out of 5 stars0 ratingsRamblings of a Mad Scientist: 100 Ideas for a Stranger Tomorrow Rating: 0 out of 5 stars0 ratingsElectrical Engineering: Know It All Rating: 4 out of 5 stars4/5No Nonsense General Class License Study Guide: for Tests Given Between July 2019 and June 2023 Rating: 4 out of 5 stars4/5Programming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5Starting Electronics Rating: 4 out of 5 stars4/5Electrical Engineering Rating: 4 out of 5 stars4/5Very Truly Yours, Nikola Tesla Rating: 5 out of 5 stars5/5Electric Circuits Essentials Rating: 5 out of 5 stars5/5Solar & 12 Volt Power For Beginners Rating: 4 out of 5 stars4/5C++ Programming Language: Simple, Short, and Straightforward Way of Learning C++ Programming Rating: 4 out of 5 stars4/5Basic Electronics: Book 2 Rating: 5 out of 5 stars5/5Practical Transformer Handbook: for Electronics, Radio and Communications Engineers Rating: 4 out of 5 stars4/5Schaum's Outline of Basic Electricity, Second Edition Rating: 5 out of 5 stars5/5
Reviews for Microprocessor and Microcontroller Interview Questions
0 ratings0 reviews
Book preview
Microprocessor and Microcontroller Interview Questions - Anita Gehlot
CHAPTER 1
Number Systems
Introduction to Number systems
Number systems are used to reparesent the information in various systems. Electronic and Digital systems may use a variety of different number systems, (Decimal, Hexadecimal, Octal, Binary).
A number N in base or radix b can be written as:
(N)b = dn-1 dn-2 — — — — d1 d0. d-1 d-2 — — — — d-m
In the above:
dn-1 to d0 is integer part
follows a radix point
d-1 to d-m is fractional part.
Here:
dn-1 = Most significant bit (MSB)
d-m = Least significant bit (LSB)
Binary number system
The binary number system is another way to represent quantities. The binary number has only two digits 0 and 1.
Weight structure of a binary system is:
2n-1……….2³ 2² 2¹2⁰. 2-1 2-2 2-3 ……. 2-n
Where:
n: The number of bits from the binary point
.: Binary point
2: Base of binary number system.
Example: (11011)2
Octal number system
The number system whose base is 8 is known as the octal number system. The base 8 means the system uses eight digits from 0 to 7. The next digit in octal number is represented by 10, 11, 12, 13, 14, 15, 16, 17 which represents the decimal digits 8, 9, 10, 11, 12, 13, 14, 15.
Weight structure of an octal system is:
8n-1……….8³ 8² 8¹8⁰. 8-1 8-2 8-3 …….. 8-n
Where:
n: positional of octal number system
. : Octal point
8: Base of octal number system.
Example: (745)8
Decimal number system
The number system whose base is 10 is known as the decimal number system. The base 10 means the system uses ten digits from 0 to 9.
Weight structure of a decimal system is:
10n-1…………10³ 10² 10¹ 103⁰. 10-1 10-2 10-3 …….. 10-n
Where:
n: positional of Decimal number system
. : Decimal point
10: Base of Decimal number system.
Example: (7459)10
Hexadecimal (hex) number system
The number system whose base is 16 is known as the Hexadecimal number system. The base 16 means the system uses ten digits from 0 to 9, A – F.
Weight structure of a decimal system is:
16n-1…………16³ 16² 16¹16⁰. 16-1 16-2 16-3 …….. 16-n
Where:
n: positional of Hexadecimal number system
. : Hexadecimal point
16: Base of Hexadecimal number system.
Example: (75AC)16
The table 1.1 shows the decimal, binary, octal, and hexadecimal numbers from 0 to 15 and their equivalent binary number.
Table 1.1: Number system equivalent
Complement
Complements are used in digital computers to simplify subtraction. The complements are classified in two types based on the number systems base.
r’s complement or Radix complement.
(r-1)’s complement or diminished complement.
r’s complement
If N is a positive number to base r with integer part of n digit, the r’s complement of N is defined as rn – N.
r’s complement = rn – N
Where:
r: base of the number system
n: number of integer digit
N: given positive number
Or
r’s complement = (r-1)’s complement + 1
Question 1.1: Find 2’s complement of 11011 binary number
No of integer digits = 5
(r-1)’s Complement
If N is a positive number in base r with n integer digits and m fraction digits, (r-1)’s complement is defined as:
[(rn– 1) – N] or (rn – r-m - N)
Where:
r: base of the given number system
n: number of integer digits
N: given positive number
m: number of fraction digits
Question 1.2: Find 1’s complement of 10110 binary number.
Number of integer digit = 5
Number Conversion
Binary to Decimal conversion
Steps:
Write the binary number
Write the weights 2⁰ 2¹ 2² 2³ etc., under the binary digits starting with the bit on right hand side.
Cross out weights under zeros
Add the remaining weights.
Question 1.3: Convert the given binary number into decimal number (10011)2 = (?)10
First, multiply all the digits in the number by 2 and add them:
(1*2) + (0*2) + (0*2) + (1*2) + (1*2)
Give powers to 2 starting from 0 from right to left.
(1*2⁴) + (0*2³) + (0*2²) + (1*2¹) + (1*2⁰)
That’s all the formula part.
Now, convert the powers of 2 to the numbers.
(1*16) + (0*8) + (0*4) + (1*2) + (1*1)
Summing up all, gives the answer as:
16 + 0 + 0 + 2 + 1 = 19
So, (19)10 is the decimal equivalent of the given binary number (10011)2.
Question 1.4: Convert the given binary number into decimal number (110111)2 = (?)10
So, (55)10 is the decimal equivalent of the given binary number (110111)2.
Question 1.5: Convert the given binary number to decimal number (1101)2 = (?)10
Question 1.6: Convert the given binary number to decimal number (1011.101)2 = (?)10
Split non-fractional part and fractional part
Non fractional part: (1011)2
Fractional part: (.101)2
Binary to decimal conversion for non-fractional part
(1*2³) + (0*2²) + (1*2¹) + (1*2⁰)
= 8 + 0 + 2 + 1
= (11)10
Binary to decimal conversion by putting negative power for fractional part
(1*2-1) + (0*2-2) + (1*2-3)
= (1* 1/2) + 0 + (1*1/8)
= (1/2) + (1/8) = 5/8 = 0.625
So, we got (0.625)10, which is the decimal equivalent of the binary fraction (.101)2. Therefore, the decimal form of the binary number (1011.101)2 is (11.625)10.
Binary to octal conversion
Question 1.7: Convert the given binary number to decimal number (10111101)2 = (?)8
In this the given number is grouped in bits of threes, and then each group is converted to its decimal.
101 ➔ 5
111 ➔ 7
010 ➔ 2
So, (275)8 is the octal equivalent of the given binary number (10111101)2.
Question 1.8: Convert the given binary number to decimal number (1011100011)2 = (?)8
In this the given number is grouped in bits of threes, and then each group is converted to its decimal.
011 ➔ 3
100 ➔ 4
011 ➔3
001 ➔ 1
So, (1343)8 is the octal equivalent of the given binary number (1011100011)2.
Binary to Hexadecimal conversion
Question 1.9: Convert the given binary number to Hexadecimal number (1011100011)2 = (?)16
In this the given number is grouped to bits of fours, and then each group is converted to its Hexadecimal.
0011 ➔ 3
1110 ➔ 14 ➔ E
0010 ➔ 2
So, (2E3)16 is the Hexadecimal equivalent of the given binary number (1011100011)2.
Question 1.10: Convert the given binary number to Hexadecimal number (111001100011101)2 = (?)16
In this the given number is grouped to bits of fours, and then each group is converted to its Hexadecimal.
1101 ➔ 13 ➔ D
0001 ➔ 1
0011 ➔ 3
0111 ➔ 7
So, (731D)16 is the Hexadecimal equivalent of the given binary number (111001100011101)2.
Decimal to Binary conversion
Question 1.11: Convert the given decimal number to binary number (548)10 = (?)2
In this conversion, we divide the decimal number continuously by 2, note down its remainder and continue with the dividing of number until the quotient get 0.
We have to take (write) down to up as MSB to LSB correspondingly.
So, (1000100100)2 is the Binary equivalent of the given decimal number (548)10.
Question 1.12: Convert the given decimal number to binary number (41.68)10 = (?)2
For fractional part:
For fractional decimal numbers, multiply it by 2 and record the carry in the integral position.
For integral part is remaining same:
For fractional part:
For fractional part we need take (Write) from top to bottom.
So, (101001. 10101..)2 is the Binary equivalent of the given decimal number (41.68)10.
Decimal to octal conversion
Question 1.13: Convert the given decimal number to octal number (458)10 = (?)8
In decimal to octal conversion, number is continuously divided by 8 and the remainder is recorded until the quotient is 0.
So, (712)8 is the Octal equivalent of the given decimal number (458)10.
Decimal to Hexadecimal conversion
Question 1.14: Convert the given decimal number to Hexadecimal number (458)10 = (?)16
In decimal to hexadecimal conversion, number is continuously divided by 16 and the remainder is recorded until the quotient is 0.
So, (1CA)16 is the Hexadecimal equivalent of the given decimal number (458)10.
Octal to Binary conversion
Question 1.15: Convert the given octal number to binary number (472)8 = (?)2
In octal to binary conversion, number can be converted to