Home > Projects, Tools & Filters > The project ‘dec2bin’ (decimal to binary converter).

The project ‘dec2bin’ (decimal to binary converter).

The project ‘dec2bin’ (decimal to binary converter) is the implementation of an idea I had for some time. I have to admit that sometime in the past when studying possible ways of programming embedded systems with the programming language C and C++, I felt the need to be able to produce, through a program, supposed memory addresses in the form of binary numbers.

This project therefore focuses on the implementation of a program that covers this need. During program execution, it is asked of the user to enter a number. Then, this number is the exponent of a power whose base is 2. Finally, all possible combinations of binary numbers are printed on the standard output, starting from zero up to the previous result of the power mentioned above (minus one for the reason that we are starting from zero).

The program can produce binary numbers starting from 0 up to 18,446,744,073,709,551,615 for the reason that it uses unsigned long long (64-bit) integers. If your computer has an architecture of less than 64-bit, then it is good to know that the corresponding maximum you can get is smaller too.

Picture of the program:

For more information you can get the project itself:

`decimal-to-binary-converter

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: