Skip to main content

Questions tagged [numeral-representations]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
15 views

What's the point of the thresholds in Punycode/Bitstring?

I've just read the Punycode spec in RFC 3492, as well as descriptions of it across some other articles. Punycode uses a numeral system the authors called "generalized variable-length integers&...
minseong's user avatar
  • 161
0 votes
1 answer
52 views

What is the purpose of padding bits in primitive integer types?

The C standard carves out room for implementations which have padding bits in their integer types. Padding bits affect the size of an integer but not the number of possible values they can contain. I ...
CPlus's user avatar
  • 207
1 vote
2 answers
329 views

How do you bit-shift in RISC-V?

In the following video on computer organization: https://youtu.be/DoR505t8-7I?t=114 the instructor displays the following: and says that the hex string 0xFFFFFF00 ...
Addem's user avatar
  • 347
1 vote
2 answers
72 views

Uses of Hex and Octal numbers in programming

Where are these number patterns, Octal and Hex, being used? I read this but I want to know where they are used in programming.
lunix's user avatar
  • 111
2 votes
4 answers
175 views

Is there a binary representation where the encoding distance grows with the arithmetic distance?

I need to binarily encode/decode small integers (around 10 bits), in such a way that the hamming distance of the encoded number grows monotonically with the (absolute value) arithmetic distance of the ...
Lewec's user avatar
  • 23
-1 votes
1 answer
712 views

Unsigned/signed boolean

Answer is c). I understand that the expression evaluates to true but what does signed/unsigned have to do with booleans?
Ray's user avatar
  • 137
2 votes
0 answers
35 views

Efficient parameterization of low vertex count polygons

I'm trying to design a method to represent polygons as vectors. There are many ways to do this, but I have a few goals and I'm not sure what representation is best to fulfil these. The objectives are: ...
Erik's user avatar
  • 21
1 vote
2 answers
241 views

Streaming digit-to-digit conversion from decimal to hexadecimal

I am looking for a streaming algorithm for converting a decimal number to a hexadecimal number. I am assuming the input is a string represention of a decimal number (i.e., each character is a decimal ...
ljleb's user avatar
  • 138
0 votes
1 answer
600 views

Normalization in IBM hexadecimal floating point

According to the Wikipedia link of IBM hexadecimal floating point: Consider encoding the value −118.625 as an IBM single-precision floating-point value. The value is negative, so the sign ...
avistein's user avatar
2 votes
1 answer
68 views

Conversion from octal numerical system to binary numerical system

I know that in order to convert a numeral in base-8 to a numeral in base-2 I can write each octal digit as a binary word of 3 bits. I know that 2^3 = 8 that is exactly the dimension of the base of ...
zar's user avatar
  • 23
3 votes
2 answers
139 views

How much can we trust mathematical software when working with large numbers, and how much memory it needs to work with these numbers?

For example, I want to evaluate the expression: $3^{3^{{3}^{3}}}$ so I used wolframalpha.com (it's free, and I don't own any software), which returned the scientific notation of the number above, ...
Pinteco's user avatar
  • 151
3 votes
4 answers
2k views

Binary 2s Compliment Applied Twice Gives Original - How?

At the moment the maths behind binary 2s compliment seems like voodoo to me. If I take 0011 (+3) and "flip and add 1", I get 1101 (-3) If I apply the same process to 1101, ("flip and add 1"), I get ...
Robin Andrews's user avatar
3 votes
1 answer
10k views

Overflow rule in two's complement arithmetic

In the book by William Stallings the overflow rule overflow rule for 2's complement addition is stated as follows: Overflow rule: If two numbers are added, and they are both positive or both ...
RajS's user avatar
  • 1,667
3 votes
2 answers
49 views

Balanced based representation

I'm interested in balanced base $B$ representation for fixed point arithmetic. The paper Fixed-point arithmetic in SHE schemes (Costache, Smart, Vivek and Waller, in Proceedings of 23rd International ...
dfine's user avatar
  • 33
3 votes
1 answer
299 views

Two's complement general formula

In college, we've seen some general formulas to compute the decimal value a of a binary representation $a_{N-1} \dots a_2 a_1 a_0$ in two's complement, $N$ being the number of bits. For $a \ge 0$ we'...
L3k's user avatar
  • 33
3 votes
1 answer
53 views

Why does existence of predecessor imply adequacy of a numeral system?

I encountered this result when working with $\lambda$-calculus (so every element I mention here was a $\lambda$-expression there [1]), but I will express everything with, more understandable to ...
Sandro Lovnički's user avatar
4 votes
2 answers
961 views

Which number representation takes the largest amount of memory?

Options are: Signed magnitude One's complement Two's complement Excess notation This is the question from an 'example of a previous exam' I've been given at university. Answers were not provided. As ...
Evgenia Karunus's user avatar
2 votes
2 answers
1k views

4-digit 5's complement of a negative number

Let $n = -13, \ k = -24$ How do I find the 4-digit 5's complement of each number? What would be the result of $n + k$ in complement representation? I understand how to calculate $n$-digit, 2's ...
yarafoudah's user avatar
1 vote
2 answers
5k views

What are the reasons for and against using normalized floating point?

Floating point number formats can be normalized or not, meaning that ‘normal’ floating point numbers have an implicit (hidden) leading bit 1 in the significand. For example, the binary IEEE 754 ...
equaeghe's user avatar
  • 190
-1 votes
2 answers
5k views

How many integers can you represent with 6 bits?

I might be wrong but I think it must be 2^6 = 64 integers?
user68752's user avatar
0 votes
0 answers
172 views

Representation of the number in two's complement

We have that MIMA (Neumann MInimal MAchine) has the following commands: I want to write a MIMA program that takes the value $2^{23}-24=8.388.584$ to the memory cell $y$. We have to take ...
Mary Star's user avatar
  • 431
58 votes
12 answers
29k views

Does a byte contain 8 bits, or 9?

I read in this assembly programming tutorial that 8 bits are used for data while 1 bit is for parity, which is then used for detecting parity error (caused by hardware fault or electrical disturbance)....
xtt's user avatar
  • 729
2 votes
1 answer
1k views

Convert integer of mixed radix to standard positional numeral system and vice versa

I have multiple numbers (e.g. [1, 4, 2]) where each number can be one of a specified range of numbers (e.g. [0-1, 0-5, 0-3]). I ...
mxscho's user avatar
  • 133
1 vote
1 answer
8k views

8-bit floating-point representation

I'm studying about representing fractional numbers as floating-point values. It is going to be an 8-bit representation. Somewhere in the text, it is said that: "We use the first bit to represent ...
Dsaki's user avatar
  • 13
1 vote
2 answers
186 views

Why is a negative number a pseudo-positive number in ones' complement?

I'm studying ones' complement representation and I read in a book that a negative number in ones' complement is a pseudo-positive of value $R^n - 1 - |x|$. However there is no demostration and I can'...
Joseph's user avatar
  • 33
16 votes
5 answers
21k views

Will the future quantum computers use the binary, ternary or quaternary numeral system?

Our current computers use bits, so they use the binary numeral system. But I heard that the future quantum computers will use qubits instead of simple bits. Since in the word "qubit" there is the ...
Core-Crash's user avatar
12 votes
5 answers
4k views

Is 2**x faster to compute than exp(x)?

Forgive the naïveté that will be obvious in the way I ask this question as well as the fact that I'm asking it. Mathematicians typically use $\exp$ as it's the simplest/nicest base in ...
isomorphismes's user avatar
1 vote
1 answer
61 views

Can This Property (Representative Property) Be Generalized?

I recently came across with a question that asks for the greatest subset of a given set, which includes relatively prime elements.(Randomly selected item from a set is always relatively prime to all ...
aliatlii's user avatar
18 votes
5 answers
49k views

Why octal and hexadecimal? Computers use binary and humans decimals

Why do we use other bases which are neither binary (for computers) nor decimals (for humans)? Computers end up representing them in binary, and humans strongly prefer getting their decimal ...
Quora Feans's user avatar
5 votes
2 answers
178 views

Numeral systems other than unary used in nature or in animal and human behaviours

Representing numeric values using positional notation is one of the milestones in the history of arithmetic. Babylons used a base 60 system, Maya a base 20 system; base 10 system became "the standard" ...
Vor's user avatar
  • 12.5k