XOR

Logic Level 2

If

find the value of 15 14 15\oplus 14 .


The answer is 1.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Chew-Seong Cheong
Feb 28, 2017

1 5 10 1 4 10 = 11 1 2 11 0 2 = 1 2 = 1 10 = 1 15_{10} \oplus 14_{10} = 111_2 \oplus 110_2 = 1_2 = 1_{10} = \boxed{1}

This is an interesting observation, given the examples in the problem, but note this definition isn't correct for the bitwise XOR in general.

For instance, we have 5 17 = 17 5 = 20 5 \oplus 17 = 17 \oplus 5 = 20 .

Brian Moehring - 4 years, 3 months ago

Log in to reply

In the original problem + + sign was used instead of \oplus . I was not solving it basing on XOR despite the title.

Chew-Seong Cheong - 4 years, 3 months ago

Log in to reply

@Chew-Seong Cheong Problem is fixed now. Sorry for inconvenience cause

Mohd Aasif - 4 years, 3 months ago

Log in to reply

@Mohd Aasif Not a problem. I have provided a solution.

Chew-Seong Cheong - 4 years, 3 months ago
Mohd Aasif
Mar 9, 2017
  • 15 10 14 10 = 1111 2 1110 2 = 0001 2 {15}_{10}\oplus {14}_{10} = {1111}_2 \oplus {1110}_2 = {0001}_2
  • 0001 2 {0001}_2 means that 1 10 {1}_{10} . So the final answer is 1.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...