FIND THE ANSWERS

How would you write a function to compare specific positions in a binary number?

Answer this question

  • How would you write a function to compare specific positions in a binary number?


Answers

Answer #1 | 08/02 2014 12:12
Using XOR on the two values to be compared will output a mask of the bits that differ across them.
Positive: 56 %
Answer #2 | 08/02 2014 11:45
That's depends on how you are storing your binary number( in array or as a string or long int).
Positive: 50 %
Answer #3 | 10/02 2014 15:20
I'd need to know what language you're using and what format the number is being stored as.
Positive: 30 %

Possible answer

C++ Programming Tutorial ... to compute the remainder of number divides by 2. We then compare the remainder with 0 to test ... you cannot write 1
Read more
Positive: 56 %
... the ones you write in a ... right of a binary number ... instruction set and assembly language. This language is specific to the ...
Read more
Positive: 51 %
... compare]) -- compare = 0 for binary : FIXED: Formats a number as text ... Returns a specific number of characters ... You can write a UDF ...
Read more
Positive: 37 %
MATLAB Programming/Print Version. ... To compare two strings you must use the strcmp function: ... if you write a function like this: ...
Read more
Positive: 14 %

Show more results