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

Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.

833


Tell me what are the different types of buses used by the embedded systems?

744


Explain me what is the difference between microprocessor and microcontroller?

862


What value do daily builds, automated testing, and peer reviews add to a project? What disadvantages are there?

808


What is the repository pattern?

863


Explain what are the essential components of embedded system?

755


Tell me what happens when recursive functions are declared inline?

851


What typecast is applied when we have a signed and an unsigned int in an expression?

922


Write a program to show the functionality of power-save super loop.

1025


What are the functional requirements that are used in the embedded systems?

849


Explain me what is endianness of a system and how do different systems communicate with each other?

764


Explain me what is spin lock?

705


Explain what happens when recursion functions are declared inline?

797


What is the difference between locking and lockless (optimistic and pessimistic) concurrency models?

806


What's so great about ?

777