Conversion of Decimal of any size into Binary

Nov 15
22:00

2004

Sateesh kumar

Sateesh kumar

  • Share this article on Facebook
  • Share this article on Twitter
  • Share this article on Linkedin

... of Decimal of any size into ... 1:The Binary of any decimal ... can be ... as ... where, k is a positive integer. r is such that 2pow(r) is a nu

mediaimage

Conversion of Decimal of any size into Binary
Statement 1:
The Binary of any decimal 2pow(n)+k can be formatted as 1(n−r)zeroesB(k).

where,Conversion of Decimal of any size into Binary Articles k is a positive integer.
r is such that 2pow(r) is a number greater than and nearest to k.
B(k) is the binary of k.
Statement 2:
The Binary of any decimal 2pow(n)−k can be formatted as (n−(r+1))onesB(p).
where, k is a positive integer.
r is such that 2pow(r) is greater than and nearest to k. p=(2pow(r+1))−k.
B(p) is the binary of p.

For Example:
To find the binary of 2055:
2055=(2pow(11))+7;
here, n=11; k=7;so r=3(since 2pow(r) ie., 2pow(3)=8 in nearer and greater than k ie., 7)
also B(k)=B(7)=111.
Therefore, binary of 2055 is of the form 1(11−7)zeroes111.
The above result is obtained using statement 1.

To find the binary of 4090:
4090=2pow(12)−6.
Here, n=12; k=6;so r=3(since 2pow(r) ie., 2pow(3)=8 in nearer and greater than kie.,7) also,p=2pow(3)+1−6=10.B(p)=1010;
Therefore, binary of 4090is of the form 12(3+1)ones B(10).
The above result is obtained using statement 2.

Article "tagged" as:

Categories: