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   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
 
  HR-Questions (196)
 


 

Back to Questions Page
 
Question
Design a circuit to detect when 3 and only 3 bits are set 
out of 8 bits.(eg. o0101100)
Rank Answer Posted By  
 Question Submitted By :: Newbie
This Interview Question Asked @   Qualcomm , Qualcomm, RIM
I also faced this Question!!   © ALL Interview .com
Answer
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.
 
0
Esther
 
 
Answer
3 input AND those 3 bits. No adder needed...
 
0
Josh
 
 
Answer
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.
 
0
Kalyanpa
 
 
 
Answer
keep the number in A reg and ratate it 8 times if carry 
generates more than 3  it will indicate a non desired numer
 
0
Priya
 
 
Answer
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
 
0
Ravichandra
 
 
Answer
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
 
0
Gautam Bhattacharya
 
 
Answer
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
 
0
Gautam
 
 
Answer
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:
 
0
Gautam
 
 
Answer
You fools...the question is to design a circuit
(hardware)..not writing a program.
 
0
Xyz
 
 
Answer
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.
 
0
Jayasuriya
 
 
Question
Design a circuit for A + abs(B) = C, where A and B are 4 
bits wide and 2?s complement representation
Rank Answer Posted By  
 Question Submitted By :: Newbie
This Interview Question Asked @   Qualcomm , Qualcomm
I also faced this Question!!   © ALL Interview .com
Answer
make a 4-bit adder/subtractor ( which can perform A+B and A-
B depending on value of bit say SUB..ie if SUB is 1 it will 
perform A+B ) now give A and B as inputs and make MSB of B 
as SUB bit.
suppose A=0110(6),B=1110(-2);so result will be A-B ie.,   
A+|B|=6-(-2)=8
 
0
Siva
 
 
Question
Instead of writing Home, Remote Interfaces if i directly 
extends EJBObject to bean class what happens?

Rank Answer Posted By  
 Question Submitted By :: Biju
This Interview Question Asked @   Flextronics
I also faced this Question!!   © ALL Interview .com
Answer
By implementing the home interface, we are adhering to 
EJB's write once run anywhere policy.  If the home 
interface is not implemented, it cannot be searched by 
JNDI/CORBA and can never be location over the network.
 
0
Ajit Surendran
 
 
Question
String is an immutable object.
Then how can the following code be justified.

String s1 = ?ABC?;
String s1 = s1+?XYZ?;
s.o.p(s1);

The output is ABCXYZ, which is the value of s1 ?

Rank Answer Posted By  
 Question Submitted By :: Biju
This Interview Question Asked @   Flextronics , Keen
I also faced this Question!!   © ALL Interview .com
Answer
in the later case a different overloaded contructor is 
invoked while in the prior case a different.As in the later 
case a different constructor initializes the string s1 with 
different values hence the result
 
2
Vishal
 
 
Answer
here we define s1="ABC".That means one new string is 
created.And this string value is stored in heap its 
refrence variable is s1.when we say s1+"XYZ".Then string s1 
i.e ABC and XYZ are concadinated by using concadination 
operater.It forms a new string i.e "ABCXYZ" in heap.But 
again we assign this value to the refrence variable 
s1.Then "ABCXYZ" value is assign to s1 and the string "ABC" 
which is garbage collected.
 
0
K.shiva
 
 
Answer
Compilation ERROR
Duplicate Variable s1.
 
0
Ramesh
 
 
Question
What is RAID 1 ?
Rank Answer Posted By  
 Question Submitted By :: Siddartha
This Interview Question Asked @   cDot
I also faced this Question!!   © ALL Interview .com
Answer
RAID-1: This type is also known as disk mirroring and 
consists of at least two drives that duplicate the storage 
of data. There is no striping. Read performance is improved 
since either disk can be read at the same time. Write 
performance is the same as for single disk storage. RAID-1 
provides the best performance and the best fault-tolerance 
in a multi-user system.
 
0
Sunilbaglur
 
 
Answer
Raid 1 used for mirroring .

Minimum 2 disk required in order to configure the Raid 1. 

Its one of the best solution for the fault tolerance of the
failed disks.

You can remove the failed disk and add a fresh disk which
will synchronize automatically.

RAID 1 specially for mirroring the disk in order to avoid
the   downtime bcoz of failure of HARD DISK.

Regards,
Pradeep
 
0
Pradeep Kumar
 
 
Answer
This type is also known as disk mirroring and consists of 
at least two drives that duplicate the storage of data. 
There is no striping. Read performance is improved since 
either disk can be read at the same time. Write performance 
is the same as for single disk storage. RAID-1 provides the 
best performance and the best fault-tolerance in a multi-
user system.
 
0
San Saroj
 
 
Question
Have you configured an NIS server/client ?
Rank Answer Posted By  
 Question Submitted By :: Siddartha
This Interview Question Asked @   cDot
I also faced this Question!!   © ALL Interview .com
Answer
Conguring a master NIS server: Follow the following steps
to set up a server on the second
physical machine:
1. Set up the NIS domain name with the domainname command.
Use groupi.cs498hou.uiuc.edu
as the NIS domain name for the ith group.
1
domainname groupi.cs498hou.uiuc.edu
2. Determine what les you would like to share via NIS by
editing /var/yp/Makele. Search
for the following block of lines in the makele
GROUP = $(YPPWDDIR)/group
PASSWD = $(YPPWDDIR)/passwd
etc ...
This tells NIS where your database les are located (note
that $(YPPWDDIR) is set
to /etc at the top of the makele). You need to edit the
block of lines properly. Scroll
down the makele until the following block is reached:
all: passwd group hosts rpc services netid protocols mail \
# netgrp shadow publickey networks ethers bootparams printcap \
# amd.home auto.master auto.home auto.local passwd.adjunct \
# timezone locale netmasks
This line species which maps will be made available via
NIS. You need to edit this
block of lines in order to specify which les you would like
to distribute. The only les
you need to distribute for your network are ypservers,
passwd, group, hosts, rpc, services,
netid, and protocols.
3. Initialize the NIS database with
/usr/lib/yp/ypinit -m
Do not add any slave server, as our network is really small
and a master server is
sucient. (The hosts that you add are put to the le
/var/yp/ypservers.)
4. To start the NIS server automatically at boot time, use
the commands /sbin/chkcong
--------------------------------------
Conguring an NIS client: As compared to conguring an NIS
server, NIS clients are much
easier to set up. You need to modify the following three les.
1. Edit the le /etc/yp.conf, e.g., for the rst group,
the le should be like
# /etc/yp.conf - ypbind configuration file
# Valid entries are
#
domain group1.cs498hou.uiuc.edu server m2.cs498hou.uiuc.edu

# Use server HOSTNAME for the domain NISDOMAIN.
#
#domain NISDOMAIN broadcast
# Use broadcast on the local net for domain NISDOMAIN
#
#ypserver HOSTNAME
# Use server HOSTNAME for the local domain. The
# IP-address of server must be listed in /etc/hosts.
#
2. Edit the /etc/syscong/network le to set the NIS domain
name at boot time.
NISDOMAIN=group1.cs498hou.uiuc.edu
3. Edit the /etc/nsswitch.conf le. Search for the block of
lines
passwd: files nisplus nis
shadow: files nisplus nis
group: files nisplus nis
hosts: files nisplus nis dns
services: nisplus [NOTFOUND=return] files
etc...
The order placed in the le determines the search order used
by the system, e.g., the host-
names are rst searched for in the /etc/hosts les, then via
NIS in the map hosts.byname,
and nally by DNS via the DNS server specied in
/etc/resolv.conf.
4. Now all the les are in place, set up the client daemon
to automatically start at boot time
by creating a symbolic link from /etc/rc.d/rc.3/S60ypbind to
/etc/rc.d/init.d/ypbind.
 
0
Satya
 
 
Question
What is the subnet for a class C network ?
Rank Answer Posted By  
 Question Submitted By :: Siddartha
This Interview Question Asked @   cDot
I also faced this Question!!   © ALL Interview .com
Answer
Subnet of class C Network is 255.255.255.0
 
0
Chintan Parikh
 
 
Answer
For class c Network default Subnet mask is 255.255.255.0 
but make sure while putting a question its subnet or subnet 
mask.
 
0
Surya
 
 
Answer
every Address has 24 bit if u r talking about CLASS C Ip 
address so it will be --255.255.255.0
There are 18 bit for network address and 8 bit for host 
address.

CLASS A -8 bit for network and 24 bit for host.
CLASS B -16 bit for network and 16 bit for host.
CLASS C -24 bit for network and 8 bit for host.
 
0
Sandeep Kumar Sharma
 
 
Answer
for class C subnetmask 255.255.255.0
 
0
B.sanjeev
 
 
Answer
writenow we are using IPv4 in that ips every address 32bits
if u r taking class c the subnetmask is 255.255.255.0    
       and the wildcordmask is  0.0.0.255 in that ip 32bits
24bits for networkbits and remaining 8bits are hostbits


class A - 8bits for network bits 24 bits for host bits
class B - 16bits for network bits 16 bits for hostbits
class C - 24bits for network bits 8bits for hostbits
 
0
Dn.gopal1@gmail.com
 
 
Answer
Its Very simple 

As you in the 32 bit address class . 24 bit comes in C class
hence 

8 8 8 8 byes 

255 255 255 0 defines C class subnet.

Regards,
Pradeep
 
0
Pradeep Kumar
 
 
Answer
255.255.255.0 subnet for class C network
 
0
Kapilasdhir
 
 
Answer
The Subnet will be 255.255.255.0 for class C network
 
0
Ravi Pandey
 
 
Question
What is VLAN ?
Rank Answer Posted By  
 Question Submitted By :: Siddartha
This Interview Question Asked @   cDot
I also faced this Question!!   © ALL Interview .com
Answer
Short for virtual LAN, a network of computers that behave 
as if they are connected to the same wire even though they 
may actually be physically located on different segments of 
a LAN. VLANs are configured through software rather than 
hardware, which makes them extremely flexible. One of the 
biggest advantages of VLANs is that when a computer is 
physically moved to another location, it can stay on the 
same VLAN without any hardware reconfiguration.
 
3
Sunilbaglur
 
 
Answer
Sunilbaglur's answer is right...but this is a software
implementation... there is also a hardware implementation on
switches.... and since Cisco is asking about it this might
be the right answer

VLAN on switches is a feature that allows u to use a single
switch to logically divide their ports so that we can have
different networks on them...

for example if a switch has 32 ports then we can logically
separate 8 ports for network A (or LAN A)
         8 ports for network B (or LAN B)
         8 ports for network C (or LAN C)
         8 ports for network D (or LAN D)

Since switches by default breakup collision domains, VLAN is
a way for them to act like routers by breaking up the
broadcast domain too...
 
0
Zgeorgem
 
 
Answer
VLAN virtual local area network
 
0
Test
 
 
Answer
Vlan is logical grouping of n/w users & resources that is 
connected administratively to  a defined port on a switch.

benefits of Vlan:
1)Provides n/w security
2)Provides Broadcast control.
3)Effiocient usage of bandwidth
4)Phsically you can move the host to any location,it will 
remain in same vlan.
 
3
Suresh Palanivel
 
 
Answer
before understand vlan, we must have to understand of the 
defination of lan..
{ lan include the all devices in the same broadcast domain}

broadcast domain include the set of lan-connected devices, 
when any of the devices send a broadcast frame all the 
other devices get a copy of the frame, so think of a lan 
and a broadcast basically the same thing.

without vlan, switch consider all its interfaces to be in 
the same broadcast domain, in other words all connected 
devices are in the same lan.

With vlan, a switch can put some interfaces into one 
broadcast domain and some into another creating multiple 
broadcast domain. these individual broadcast domain created 
by switch are called Vlan.....
 
0
Surjeet Gimit
 
 
Answer
Vlan - Virtual Local Area Network

the vlan can group serveral broadcast domains into multiful 
logical subnets.

u can accomplish network additions moves and changes by 
configurung a port into the appropriate VLAN. 

Vlans can enhance network security.  Vlans increase the 
number of broascast domains while decreasing thir size. 

two types vlan 1. static vlan 2. dynamic vlan.
 
2
Manikandan
 
 
 
Back to Questions Page
 
 
 
 
 
   
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