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)

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you reduce interrupt latency?

857


Tell me when one must use recursion function? Mention what happens when recursion functions are declared inline?

867


Explain how to reduce interrupt latency?

825


What is endianness of a system and how do different systems communicate with each other?

802


Explain me how does the interrupt architecture works?

861


Left to your own devices, what would you create?

732


Why are patterns important?

819


What are the qualifiers in c?

784


Tell us what is the need for an infinite loop in embedded systems?

829


Tell me what happens when recursive functions are declared inline?

876


What kinds of problems can you hit with locking model? And a lockless model?

785


Explain me what is the main function of multiplexed address/data bus?

783


Tell me can structures be passed to the functions by value?

806


How does the addition of service orientation change systems? When is it appropriate to use?

816


What is risc architecture?

784