Questions tagged [binary]

Questions related with (base 2) representation of numbers and their unique properties arising out of number representation.

Binary (base $2$) represents numbers using only the digits $0$ and $1$.

We write:

$$n=\sum\limits_{k=n}^0 a_k2^k$$

to represent a nonnegative integer, so for example $27_{10}=16+8+2+1=11011_2$

To represent nonnegative real numbers, we use:

$$n=\sum\limits_{k=n}^{-m} a_k2^k$$

where $m$ can be $\infty$. So, for example $11.001_2=3.125_{10}$.

1703 questions
1
vote
0 answers

Need to clarify 1 / LN(2) in binary representation

I want to represent 1/LN(2), 1.442695041 in 32 bits binary. I found that must be 1.0111000101010100011101100101001, but a work collegue insists it needs to be shifted right and add an integer of "1", becoming 1.10111000101010100011101100101001. Can…
1
vote
1 answer

Can't figure out this binary addition

I need to add the following numbers. I keep getting a result of 10010.101, but the answer is 10100.101. Can anyone confirm that 10100.101 is the correct answer, and that I'm the one mistaken? Numbers that need to be added: 1011 10110 …
alcatraz
  • 13
  • 3
1
vote
4 answers

The minimum negative integer value that can be represented using 32-bit signed representation

As far as signed binary numbers are concerned for a 32bit machine, the leftmost bit is allocated for the sign. When I try to calculate the smallest negative integer value which can be stored in a machine, i follow the following steps: I assign the…
1
vote
6 answers

0.9 in binary in decimal form

My daughter is studying computing at university - as I'm a programmer she is coming to me for help but I'm struggling with some of the maths she is asking me. She's asking me for help in converting 0.9 in binary to decimal form. First I had an issue…
Max
  • 11
  • 1
  • 2
1
vote
1 answer

Can a real number $x \in (0,1)$ have more than different 2 binary expansions?

I know that a real number $x \in (0,1)$ can have 2 different binary expansion. e.g 0.1 = 0.011111.... But is there any real number for which there are more than 2 different binary expansions?
1
vote
0 answers

2's complement of $F2_{(16)}$ in 8 bits

I found an exercise asking the representation of $F2_{(16)}$ in 2's complement with 8bits. I've made de conversion to binary: $11110010_{(2)}$ And I followed the procedure: transform the $1$'s to $0$'s and $0$'s to $1$'s; add $1$; and got:…
Concept7
  • 405
1
vote
1 answer

every Nth bit of on first number(expressed binary) forms the other number

I want to simplify a condition that checks if every Nth bit of on first number(expressed binary) forms the other number (expressed binary). One way to express it is condition expression. Another way is arithmetic expression. Is there any way to…
1
vote
1 answer

Inconsistensies with adding 2's Complement numbers

Perform the following additions of 2’s complement numbers. Indicate whether or not the sum overflows a 4-bit result. 1) 1101+0100 > I apply 2's Complement to 1101 = 0011 > 0011+0100 = 0111 So, it's -3+4 = 7 2) 1000 + 1001 > I apply 2's Complement to…
1
vote
0 answers

how are twos complement numbers added?

Perform the following addition of $2$’s complement numbers. Indicate whether or not the sum overflows a $4$-bit result: $1101 + 0100$ If I add, the answer is $10001$. It is five bits, so overflows. If I convert the numbers to decimal and add, it is…
1
vote
1 answer

Converting 8-bit unsigned binary numbers to 8-bit one’s complement representation

I am a bit confused. Because isn't the 8-bit one’s complement representation exactly the same as the 8-bit unsigned binary numbers representation? Because I read somewhere that "in one’s complement, positive numbers (also known as non-complements)…
Vroryn
  • 13
1
vote
1 answer

How to find the bits that fall between two given bits?

A 12-bit(binary-digit) number, consisting of 8 integer bits and 4 fractional bits, is to be sent from a sender to a receiver via a wireless communication channel. a) List all the numbers(in decimal) that can via this channel, between 1.25 and 1.5…
XxS0ul678
  • 105
1
vote
0 answers

What is the efficient way to show next binary having n no of 1?

I need this series of data where n = 4. 111100 111010 111001 110110 110101 110011 101110 101101 101011 100111 011110 011101 011011 010111 001111 All of the above number contains 4 no's of 1 I try to solve problem with…
Batakj
  • 163
1
vote
1 answer

Why don't we use decimal in computers?

Why is binary preferred in a computer system? Wouldn't it make more sense to use the more familiar decimal system instead?
m34diz
  • 83
1
vote
1 answer

Is there a way to find out if a number contains a specific decimal digit from its binary representation?

If the number has 2 on it: starting from 2 >> 0000 0010, 12 >> 0000 1100, 20 >> 0001 0100 and so on. I tried to figure out a relationship whether the number contains e.g. 2 and the number of one's and their position on its binary representation? Is…
Mosaaleb
  • 113
1
vote
3 answers

Hexadecimal to Decimal Translation Using Two's Complement

I am having a difficult time figuring out how to translate hexadecimal byte code in to decimal using two's complement when the number is negative. For example: if the number is 0xF99 (which is 1111 1001 1001 in binary), then do you proceed using…
Darien Springer
  • 133
  • 1
  • 8