ALLInterview.com :: Home Page Forum9.Com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage   interview questions urls   External Links  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories >> Software >> Embedded-Systems >> Embedded-Systems-AllOther
 
 


 

 
 Embedded Systems AllOther interview questions  Embedded Systems AllOther Interview Questions
Question
Design a circuit to detect when 3 and only 3 bits are set 
out of 8 bits.(eg. o0101100)
 Question Submitted By :: Newbie
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 1
Add the digits and check the sum. It would imply a 3-bit 
adder (max. value = 8 can be represented with three bits) 
and compare the result to 011.
 
Is This Answer Correct ?    2 Yes 0 No
Esther
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 2
3 input AND those 3 bits. No adder needed...
 
Is This Answer Correct ?    0 Yes 0 No
Josh
 
 
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 3
for serially arriving stream: 
use a 2 bit accumulator( S1 and S2) with outputs O1 and O2. 
Final Output will be Y = ~O1 . O2

For parallel, 
use combinational logic , probably priority encoder to
reduce  delay.
 
Is This Answer Correct ?    0 Yes 0 No
Kalyanpa
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 4
keep the number in A reg and ratate it 8 times if carry 
generates more than 3  it will indicate a non desired numer
 
Is This Answer Correct ?    0 Yes 0 No
Priya
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 5
step1: start
step2: mov the byte to accumulator
step3: intialize length = 0 , count = 0
step4: rotate acc. to right through carry.
step5: if carry = 1 , increment count
step6: increment length
step7: if length < 8 , goto step3
step8: if count = 3 , (do required action)
step9: end
 
Is This Answer Correct ?    0 Yes 0 No
Ravichandra
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 6
Step 1:  Store the 8 bit value in a accumulator

Step 2:  Store 0x1 in a register0, initialize two counter  
with 0 i.e. store zero in a reg1 and reg2.

LOOP:
Step 3:  Check if AND operation between the value in
register0 and accumulator is set i.e. 1 
if yes, increment reg1 and reg2
If no, increment only reg2

step 4: Left shift the value of register0 by 1
step 5: if ( reg2 >=8), exit LOOP
                 if ( reg1 >= 3), show that 3 bit is set
        Else Go To LOOP



MOV XAR1, #Data
MOV XAR0, #0
MOV XAR2, #0

Loop:
TBIT *XAR1, #Count 
BF Loop1, NTC
INR *XAR0

Loop1:
INR *XAR2
MOV AL, *XAR1
CMP AL, #0x03
BF Loop3, EQ

MOV AL, *XAR2
CMP AL, #0x80
BF Loop, NEQ

Loop3:
EXIT
 
Is This Answer Correct ?    0 Yes 0 No
Gautam Bhattacharya
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 7
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 0 No
Gautam
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 8
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 0 No
Gautam
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 9
You fools...the question is to design a circuit
(hardware)..not writing a program.
 
Is This Answer Correct ?    0 Yes 0 No
Xyz
 
 
 
 
Other Embedded Systems AllOther Interview Questions
 
  Question Asked @ Answers
 
whether the mulitasking and multiprocessing are same or not.  2
Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100) Qualcomm9
In 8085 microprocessor READY signal does.which of the following is incorrect statements [a]It is input to the microprocessor [b] It sequences the instructions Wipro2
What is Difference between CAN and GMLAN GM-General-Motors1
Design a circuit for A + abs(B) = C, where A and B are 4 bits wide and 2?s complement representation Qualcomm1
 
For more Embedded Systems AllOther Interview Questions Click Here 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com