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
45
votes
12 answers

In plain English, why does conversion from hexadecimal to binary work so cleanly?

Why does the trick of taking the binary representation of each digit and simply concatenating them work? e.g. 0x4E == 0100 concatenated with 1110, making 01001110
52d6c6af
  • 743
19
votes
1 answer

How many bits needed to store a number

How many bits needed to store a number $55^{2002}$ ? My answer is $2002\;\log_2(55)$; is it correct?
TOP KEK
  • 305
10
votes
2 answers

Why are binary numbers ordered the way they are?

Counting to 7 in binary looks like this: 0 1 10 11 100 101 110 111 The highest value is always to the left. But would it make more sense to to it like this? Is there a way that this was picked, or was it a random decision? 0 1 01 11 001 101 011 111
chr
  • 117
8
votes
2 answers

why shifting left 1 bit is the same as multiply the number by 2

I have recently faced a problem .The problem is here.We know that if we represent a decimal number in binary and move left all the bits by one. The left most bit is lost! and at the rightmost, a zero is added. The above bit operation actually…
6
votes
3 answers

Convert the following hexadecimal representation of 2’s complement binary numbers to decimal numbers.

I need to convert the following hexadecimal representation of 2’s complement binary numbers to decimal numbers I am unsure if I am doing it correctly or am I missing a step? a. xF0 b. x7FF c. x16 d. x8000 My Attempt at first converting it to a…
6
votes
5 answers

How many $1$s are in the first $1023$ binary numbers?

How many $1$s are in the first $1023$ binary numbers? I'm not to sure how to approach this question. An idea, formula, or solution is appreciated!
user406996
  • 663
  • 1
  • 5
  • 14
5
votes
6 answers

why binary is read right to left

May somebody explain this in other words? http://wiki.answers.com/Q/Why_do_you_read_binary_digits_right_to_left I know this is an akward question, but I really want to know the answer, it's just curiosity, I'm learning all that stuff of low level…
user168722
5
votes
2 answers

Terminating decimal number which is not terminating in binary

I know that when converting a decimal number from base 10 to base 2, the result might be not terminating, even though the number is terminating in base 10. For instance, 0.2 -> 0.0011 0011 0011 ... Is the contrary possible ? That means, is there a…
Jérôme
  • 515
4
votes
2 answers

The maximum number of digits in binary multiplication

Given 2 binary numbers of n digits. (n can be from 1 to something large) What is the maximum number of digits of their product? I think it's 1 in 1-digit*1-digit, and 2n otherwise. But I want some more proof. For example, n=3. So I want to know the…
4
votes
1 answer

How many bits in position i are turned on in a list of values 0-N?

Is there an equation that reflects how many values have a bit in position $i$ turned on for a list of values $0-N$?. For example if $N=5$, our numbers are represented in binary as: 000, 001, 010, 011, 100, 101, So in position 0 (least significant…
TheoretiCAL
  • 185
  • 5
4
votes
1 answer

How can I solve simple equations involving binary operators?

I have some simple equations like: A = (X AND 1779038349) XOR ((X AND 3144134329) XOR 7047511487) Where A is some constant and X is unknown (all numbers are 32 bit unsigned integers). How can I solve this for X?
user47523
  • 43
  • 4
4
votes
2 answers

Powers of 10 written as binary numbers

Consider powers of 10 written as binary numbers. 10 = 1010 , 100 = 1100100 , 1000 = 1111101000 How can I find a formula for the number of zeroes between the last and the second last 1?
3
votes
3 answers

Determine whether a number has an even number of 1's or not in a binary base

Assume that I have an ordinary number in Decmical base, now what I want to know is determining whether it has an even number of 1's in a binary base or not.and yet again I should emphasize the fact that I do not want the exact number of 1's in the…
Minuano
  • 617
3
votes
1 answer

Set of points of $[0,1)$ that have a unique binary expansion

Let $Y$ denote the set of points of $[0,1)$ that have a unique binary expansion. Then $Y$ has a countable complement so $m(Y)=1$, where $m$ is the Lebesgue measure. I have to confess that I do not know much about binary expansion and so I do not…
mathfemi
  • 2,631
3
votes
2 answers

Hexadecimal to Octal and Vice Versa

Convert Hexadecimal number to Octal - $(FD56.52A)_{16}$ to octal My answer - $(176526.2452)_8$ Convert Octal to Hexadecimal $(37.27)_8$ My answer - $(1F.5C)_{16}$. Correct or incorrect? Please help.
1
2 3
16 17