2
votes
4answers
695 views

Convert from base 10 to base 5

I am having a problem converting 727(base 10) to base 5. What is the algorithm to do it? I am getting the same number when doing so: $7*10^2 + 2*10^1+7*10^0 = 727$, nothing changes. Help me figure it ...
1
vote
3answers
30 views

Base 16 to base 10 number conversion

I know that if we want to convert from base 16 to base 10 we do as follows (for example): Given : $15C$ in base $16$ Conversion to base 10: $12 \times 16^0 + 5 \times 16^1 + 1 \times 16^2 = 348$ in ...
0
votes
0answers
33 views

What is the result of the calculation: $8.375 - 0.375-0.875$?

Given the base $\beta=2$ (binary) and $t=4$ digits to represent the number in computer with hidden bit representation and symmetric rounding, what is the result of the calculation in floating point ...
0
votes
1answer
35 views

Data Representation Question

A computer stores a number of $16$ bits word using floating-point arrangement. Given that the first bit is reserved for the sign and followed by $6$ bits for the exponent using biased form. The ...
0
votes
1answer
49 views

Expressing as 1's complement

I have the problem: Express ( -43) as a word-length 1’s complement number 43 is in decimal. I understand how to convert to Hexadecimal and take the 2's ...
1
vote
1answer
90 views

What is meaning of strict weak ordering in layman's term?

I gone through many pages using Google, but not understand exact meaning of Stick-weak Ordering term. I have this requirement while sorting strings. Thanks.
0
votes
1answer
54 views

Implement a 1-bit adder.

The truth table is: A B Sum 0 0 0 0 1 1 1 0 1 1 1 0 So no carry. Is this correct?
1
vote
1answer
71 views

Signed binary arithmetic

I'm having trouble with a fairly simply concept, signed binary arithmetic. I know how to do 1's and 2's complement, convert from binary, decimal, octal, and hex, multiply and add bytes and bits, but ...
3
votes
1answer
60 views

How to take one's complement of a positive integer?

Of course we can do that by converting the number to binary and then converting it back to decimal, but to do that directly in decimal?
1
vote
2answers
82 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
1k 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
353 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 ...
5
votes
2answers
280 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
131 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
121 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 ...