The binary-arithmetic tag has no wiki summary.
-4
votes
2answers
56 views
Binary Substraction Operation Closed Over The Set Of Natural Numbers [closed]
HISTORY AND REASONING (skip to BINARY OPERATION for actual question)
British mathematician Francis Maseres claimed that negative numbers:
"... darken the very whole doctrines of the equations and ...
1
vote
1answer
31 views
Subtracting a two's complement value from another two's complement value
I'm trying to solve the following problem:
$$ 6AD3 - AF20 $$
Both of these are hex values in two's complement.
I keep getting one answer but it's turning out worng. What I tried to do, was take ...
4
votes
2answers
51 views
Minimizing the full adder - where did this XOR come from?
When minimizing the full adder, I don't understand why $A(\bar{B}\bar{C} + BC)$ reduces to $A\overline{(B\oplus{C})}.$
$(\bar{B}\bar{C} + BC)\to (B\oplus{C})$ is partially decipherable, but why is ...
2
votes
1answer
30 views
Why is binary subtraction referred to as the invert-add-shift-add method?
I'm being asked this question for my computer conceptes class, can't find anything about this in my text book, and have only been able to find half-baked answers googling it.
Why is binary ...
1
vote
2answers
61 views
Subtracting an integer from an ASCII number
Theoretically, if I were to subtract the number 10 from the ASCII character 10 (which is really 00110001 00110000), what would I get?
Does the computer add both ASCII characters and subtract?
0
votes
2answers
65 views
Which is more computationally efficient: multiplication or 0 padding?
On a PC I am implementing an algorithm in which a number from a look table will be chosen randomly, and will be multiplied by 1000 or 10000. Instead of multiplying by 1000 or 10000 I am thinking of ...
3
votes
1answer
86 views
Normalizing the mantissa in floating point representation
How to represent $0.148 * 2^{14}$ in normalized floating point arithmetic with the format
1 - Sign bit
7 - Exponent in Excess-64 form
8 - Mantissa
$(0.148)_{10} ...
7
votes
3answers
156 views
Finding maximum and minimum of consecutive XOR values
Given an integer array (maximum size 50000), I have to find the minimum and maximum $X$ such that $X = a_p \oplus a_{p+1} \oplus \dots \oplus a_q$ for some $p$, $q$ with $p \leq q$.
I have tried this ...
0
votes
1answer
73 views
Floating-Point Binary to Decimal
I'm having difficulty with the following question:
Given a bit pattern with mantissa $10110000$ and exponent $0111$, what
does the bit pattern represent in denary (i.e decimal / base 10)?
I ...
12
votes
2answers
144 views
Function that spreads input
I'd like to know if there is a function $f$ from n-bit numbers to n-bit numbers that has the following characteristics:
$f$ should be bijective
Both $f$ and $f^{-1}$ should be calculable pretty fast
...
3
votes
1answer
68 views
Computing the rank of a multiset after inserting another element
What is the procedure for computing the rank of a multiset after inserting an element?
For instance, lets say we have a set $S = (0,1)$ containing $n = 2$ distinct elements.
The multiset $M = (1,1)$ ...
3
votes
4answers
157 views
Get specified bit in addition of two large binary numbers
I am performing an addition operation on two large binary numbers that have an equal number of bits. Both numbers are stored in an array of length $N$, which is rather large.
At first I tried running ...
5
votes
3answers
271 views
Converting function to bitwise only?
I have a function to count upper bits of a 32 bit value. So if a number is 11100011111..., the result is 3 as there are 3 ones in the most significant place before a 0 is hit.
I need to convert the ...
1
vote
1answer
94 views
Double-nested loop with bitwise operation
I have this little exercise:
for ( i = 0; i < 2 * n; i += 2 )
for ( j = 1; j <= n; j <<= 1 )
if ( j & i )
foo ();
(...