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...


Design a circuit to detect when 3 and only 3 bits are set
out of 8 bits.(eg. o0101100)

Answers were Sorted based on User's Feedback



Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)..

Answer / gautam

Sorry thr was a bit mistake. Corrected :

MOV XAR1, #Data
MOV XAR0, #0
MOV XAR2, #0

Loop:
TBIT *XAR1, *XAR2
BF Loop1, NTC
INR *XAR0

Loop1:
INR *XAR2
MOV AL, *XAR0
CMP AL, #0x03
BF Loop3, EQ

MOV AL, *XAR2
CMP AL, #0x80
BF Loop, NEQ

Loop3:
EXIT

Is This Answer Correct ?    0 Yes 3 No

Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)..

Answer / gautam

I have modified it a bit,

MOVL XAR1, #Data
MOVL XAR0, #0x00
MOVL XAR2, #0x00

Loop:
TBIT *XAR1,#XAR2
BF Loop1, NTC
INR AR0

Loop1:
INR AR2
MOV AL, *XAR0
CMP AL, @0x03
BF Action, EQ

MOV AL, *XAR2
CMP AL, @0x08
BF Loop, NEQ

Loop3:
EXIT

Action:

Is This Answer Correct ?    0 Yes 5 No

Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)..

Answer / josh

3 input AND those 3 bits. No adder needed...

Is This Answer Correct ?    0 Yes 18 No

Post New Answer

More Embedded Systems AllOther Interview Questions

Tell me what are the qualifiers in c?

0 Answers  


Explain what is interrupt latency? How can you reduce it?

0 Answers  


How can to check the working of a sensor deployed in a project?

0 Answers   CMC,


What is the function of watchdog timer in embedded system?

0 Answers  


What happens when recursive functions are declared inline?

0 Answers  


You have two computers, and you want to get data from one to the other. How could you do it?

0 Answers  


Explain me what are the rules followed by mutexes?

0 Answers  


What do you do when you get stuck with a problem you can't solve?

0 Answers  


Have you designed ui, user interface?

0 Answers  


What is the volatile keyword used for?

0 Answers  


What is a 'volatile' variable?

0 Answers  


Explain the concept of convention over configuration, and talk about an example of convention over configuration you have seen in the wild.

0 Answers  


Categories