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
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 |
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 |
Discuss the concept of yagni and explain something you did recently that adhered to this practice.
You have just been put in charge of a legacy code project with maintainability problems. What kind of things would you look to improve to get the project on a stable footing?
Whether we can use semaphore or mutex or spinlock in interrupt context in linux kernel?
What does malloc do? What will happen if we have a statement like malloc(sizeof(0));
Tell me what is the difference between hardware design and software design?
What is the purpose of a watchdog timer?
What is watchdog timer?
What is difference between binary semaphore and mutex?
What are the components of embedded system?
What's your experience with qa engineering?
How does combination of functions reduce memory reuirement in embedded system?
Describe to me some bad code you've read or inherited lately.