# What's the answer for that :A, B and C are 8 bit no's. They are as follows:A -> 1 1 0 0 0 1 0 1B -> 0 0 1 1 0 0 1 1C -> 0 0 1 1 1 0 1 0 ( - =minus, u=union)Find ((A - C) u B) =?

This question is related to TCS Interview

#### shankar4u Profile Answers by shankar4u

• Oct 10th, 2006

the val of A:197(binary to decimal),B:51, c=57

so (a-b) +c=191.

#### vchandm23 Profile Answers by vchandm23

• Oct 10th, 2006

no shankar4u ur wrong in ur calculation..... its ((A-c)B)

ie

197-51=146

146+58 = 204

#### batche Profile Answers by batche

• Jan 17th, 2007

frnds d ans wl b....

decimal value of a,b,c are 197,51,57 respctivly

so(a-b)=197-51=146

thre4...[(a-b)+c]=146+57=203... ok

#### S.Seenivasan @SVCE

• Jan 20th, 2007

Friends we can give the answer as binary number..... i think tat will be the correct one

#### girish

• Feb 3rd, 2007

If we proceed as seenivasan said we would get the right answer becoz union is not addition A- 11000101( -) C- 00111010--------------------------------R- 10001011 where R is te resultant of A-CB- 00110011---------------------------------- 10111011 is the answer and decival value is 187. because (RUB) is R or B. so This is the OR operation...not addition.if we add result is 190

#### SAMEERUDDEEN

• Feb 10th, 2007

Mr.sssss,
The Value of C is 58 so the ans is 204.

• Mar 2nd, 2007

We have to find (A-C) U B
To find A-C, We will find 2's compliment of C and them add it with A,
That will give us (A-C)
2's compliment of C=1's compliment of C+1
=11000101+1=11000110
A-C=11000101+11000110
=10001001
Now (A-C) U B is .OR. logic operation on (A-C) and B
10001001 .OR . 00110011
Whose decimal equivalent is 187.

#### rajkumar

• Mar 4th, 2007

a-b=10010010 .....
(a-b)uc=10111010Â  or 186

#### rajkumar

• Mar 4th, 2007

sorry friends ..
i sud find (a-c)ub..
but i found (a-b)uc...

now
a-c=10001011...
and (a-c)ub=10111011 and 187 is currect ans

#### jyoti

• Mar 9th, 2007

raj is absolutely right
...a=11000101
c=00111010
(a-c) means take 2's complement of c(i.e.1's complement+)
i.e 11000101+1=11000110(2's complement)
then a-c=11000101+11000110=10001011
((a-c)ub) union means OR operation
so,10001011 OR 00110011=10111011=(1+2+8+16+32+128=187)

#### sneha kumari

• Jan 12th, 2015

219

#### bhavani

• Jan 25th, 2015

00001000

#### kalaiarasi c

• Jan 31st, 2015

11000010

#### krishanmurari61 Profile Answers by krishanmurari61

• Feb 4th, 2015

187

#### Karudaiyar

• Feb 11th, 2015

i think the correct ans is 190..bec a=197,b=51,c=58...so (a-c)+b............