Digit number system with weights

The basic concept of number system:

  People in production practices and daily life, creating a number of various methods of representation, these rules represent the number of called number system. Wherein bits are counted according to the number of feed system is called the binary notation.

Bit right:

   Any R-nary numbers are represented by a string of digital, where the size of the actual value of each bit of the digital represented only related to the digital value itself, but also with its location. Reference value on this location is referred to as bit weight (or bit value).

By weight of radix bits R i represents power. For R nary bit right before the decimal point position 1 is R ^ 1, the second bit position right before the decimal point of R ^ 2, a first bit after the decimal point to the right R ^ -1, the second decimal right bit position is R ^ -2, and so on.

Suppose a binary number having n bits R integers, m decimal, then the bit weight of R ^ 1, where i = -m ~ n-1. Obviously, for a R nary any, the smallest of its rightmost digit digital rights, and the right to the left-most digit largest digital.

Bitwise right to expand the number of:

    Similar decimal value represents the value of any R-nary number can be expressed as: Members of the product itself, its digital value bit location and the right. E.g:

Decimal 256.16 Bitwise right expansion:

(256.16)10 = 2*102+5*101+6*100+ 1*10-1+6*10-2

101.01 bit binary number right expansion:

(101.01)2 = 1*22+0*21+1*20+0*2-1+1*2-2

Octal 307.4 Bitwise right expansion:

(307.4)8 =3*82+0*81+7*80+4*8-1

Hexadecimal number F2B expansion Bitwise right:

(F2B)16 = 15*162+2*161+11*160

Guess you like

Origin www.cnblogs.com/py2019/p/12187603.html