# Questions tagged [numeral-representations]

The tag has no usage guidance.

29 questions
Filter by
Sorted by
Tagged with
33 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 ...
96 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 ...
1 vote
51 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.
165 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 ...
665 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?
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: ...
1 vote
229 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 ...
553 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 ...
66 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 ...
136 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, ...
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 ...
9k 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 ...
48 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 ...
295 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'...
50 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 ), but I will express everything with, more understandable to ...
920 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 ...
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 ...
1 vote
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 ...
4k views

### How many integers can you represent with 6 bits?

I might be wrong but I think it must be 2^6 = 64 integers?
171 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 ...
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)....
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 ...
1 vote
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 ...
1 vote
181 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'...
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 ...
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 ...
1 vote
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 ...