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

Explain scope of static variables?

0 Answers  


How many types of ipc mechanism you know?

0 Answers  


Tell me why is it better to use multi-threading polling then single threading model?

0 Answers  


What is return type of isr?

0 Answers  


What are the different types of buses used by the embedded systems?

0 Answers  


Give an example of troubleshooting on embedded targets. Explain the process step-by-step.

0 Answers  


Explain whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?

0 Answers  


Please explain what is interrupt latency? How can you reduce it?

0 Answers  


What's your experience with technical documentation?

0 Answers  


Tell me what is the function of dma controlled in embedded system?

0 Answers  


What is difference between using a macro and a in line function?

0 Answers  


What are the advantages and disadvantages of separation of concerns?

0 Answers  


Categories