ALLInterview.com :: Home Page KalAajKal.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  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
 
 


 

 
 86 Family interview questions  86 Family Interview Questions
 VLSI interview questions  VLSI Interview Questions
 DSP interview questions  DSP Interview Questions
 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 ?    13 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 6 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 ?    6 Yes 4 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 ?    2 Yes 3 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 2 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 2 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 3 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 ?    9 Yes 0 No
Xyz
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 10
Use a 8 bit parallel in serial out shift register. Use the
serial out bit to increment a counter(a 3 bit register), if
its one. After 8 shifts, compare the counter with 011b to
detect 3.
 
Is This Answer Correct ?    6 Yes 1 No
Jayasuriya
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 11
The first guy's got it write, every other answer is more 
complicated than needed. Also, we cannot use a 3-input AND 
like the second guy said b/c we are given 8 bits, not 3. A 
3-bit adder and a comparator is all you need.
 
Is This Answer Correct ?    2 Yes 2 No
Aiyush
 
  Re: Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100)
Answer
# 12
bt y only 3 bit adder is used??
 
Is This Answer Correct ?    0 Yes 0 No
Abc
 

 
 
 
Other Embedded Systems AllOther Interview Questions
 
  Question Asked @ Answers
 
Design a circuit to detect when 3 and only 3 bits are set out of 8 bits.(eg. o0101100) Qualcomm12
Is tasklets or workqueues or softirqs are scheduled by the scheduler?  1
whether the mulitasking and multiprocessing are same or not.  5
What is mutex precisely used for?  2
Design a circuit for A + abs(B) = C, where A and B are 4 bits wide and 2?s complement representation Qualcomm1
wat are the different rtos available? wat is the difference beetween RTOS ans OS LG-Soft2
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
 
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 interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

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