Write a Program to check if given number is binary or not

This article will help you to understand “java program to check binary number”.

In mathematics and digital electronics, a binary number is a number expressed in the binary numeral system or base-2 numeral system which represents numeric values using two different symbols: typically 0 (zero) and 1 (one).

The base-2 system is a positional notation with a radix of 2. Because of its straightforward implementation in digital electronic circuitry using logic gates, the binary system is used internally by almost all modern computers and computer-based devices.

Each digit is referred to as a bit.

Java Program to check if given number is binary or not

Output

Is number 1001100101 binary? : true Is number 001201010 binary? : false

Some theory part of this article uses material from the Wikipedia article “Binary Number”, which is released under the CC BY-SA 3.0.

It's good to share...Share on FacebookTweet about this on TwitterShare on LinkedInPin on PinterestShare on Google+Email this to someone

Leave a Reply

Your email address will not be published. Required fields are marked *