# Thread: [SOLVED] bit operations...need some help

1. ## [SOLVED] bit operations...need some help

Im reading the two paragraphs that my book covers and it isnt making any sense at all!

I need to evaluate the following expression:
100110 AND (011111 XOR 101011)

The book says that 0=f and 1=t.

Can someone please explain this?! I tried following the only example and it doesn't show steps or an explaination.

It says:
Find the bitwise OR, AND, and XOR of the bit strings 01 1011 0110 and
11 0001 1101.

OR = 11 1011 1111
AND = 01 0001 0100
XOR = 10 1010 1011

2. Compare the two strings bit by bit (position by position).
For ‘OR’: if either bit is a 1 then the ‘new’ bit is a 1, otherwise it is 0.
For ‘AND’: if both bits are a 1 then the ‘new’ bit is a 1, otherwise it is 0.
For ‘XOR’: if either bit is a 1 but not both then the ‘new’ bit is a 1, otherwise it is 0.

In the example, I suggest that you stack the strings to compare them.
01 1011 0110
11 0001 1101

OR = 11 1011 1111
AND = 01 0001 0100
XOR = 10 1010 1011

3. I get that part now, but throwing in the & and the # are throwing me off big time! dDo I stack them too?

011 111
101 011
---------
110 100
100 110
100 100

Is that remotely close?