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
Why is the single responsibility principle important?
Why are interfaces important?
Which is the best way to write loops?
Tell me can we use any function inside isr?
What is the difference between "set" logic, and "procedural" logic. When would you use each one and why?
can a pointer be volatile ? Explain.
How do malloc and calloc work?
What is the repository pattern? Why are patterns important?
What is the last programming book you read?
Explain me how does the interrupt architecture works?
Explain whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?
Describe a pattern that is not the factory pattern?
What is mutex in an embedded system?
How might a task-based model differ from a threaded model?
Tell me when one must use recursion function? Mention what happens when recursion functions are declared inline?