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


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.

Leave a Reply

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