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) =?

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.

bhaskarrkbhd1

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
The answer is = 10111011,
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)

## 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## Related Answered Questions

## Related Open Questions