Tagged Questions
1
vote
2answers
36 views
Decimal Floating Point to Shortest Binary
Might be more of a Comp Sci question so apologies if it's not appropriate.
Basically I have a range bounded by two floating-point decimals <1. I need to find a short binary number lying between ...
1
vote
3answers
148 views
Way of simplifying binary multiplication
Is there a way to simplify multiplication of binary numbers regardless of digits? Or do we always have to resort to 10-base multiplication? As computers do multiplication, there should be ways to ...
2
votes
1answer
207 views
Calculating CRC code
I think I may be under a misconception. When calculating the CRC code, how many bits do you append to the original message? Is it the degree of the generator polynomial (e.g. x^3+1 you append three ...
4
votes
2answers
171 views
Why does the $2$'s and $1$'s complement subtraction works?
The algorithm for $2$'s complement and $1$'s complement subtraction is tad simple:
$1.$ Find the $1$'s or $2$'s complement of the subtrahend.
$2.$ Add it with minuend.
$3.$ If there is ...
1
vote
0answers
101 views
1s surpassing 0s in binary strings of odd length
Let $A(k)$ be the number of distinct binary strings of length $2k+1,$ for which the number of $1$s surpasses the number of $0$s for the first time at digit number $2k +1$, i.e., in the final digit in ...
0
votes
1answer
84 views
first 1 in a bitmask using log2
I am trying to get the last 1 in a bitmask. More mathematically speaking, I have a number k, that can be written in its binary form as a sequence of 1 and 0. I want the "weight" or "index" of the last ...