Does the binary contain 2 digits? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Does the binary contain 2 digits?

Hi guys, please give me my answer. :-)

8th May 2018, 6:37 PM
program
program - avatar
4 Answers
+ 10
Not to be too pedantic, but binary doesn't "contain 2 digits". Rather, a binary digit is based on two possible values. These values can be represented as {1, 0}; {on, off}; {true, false}; {yes, no}; {a, b}; {black, white}; {opened, closed} and so on and so forth. A binary value can contain many digits to represent a value. This is similar to how decimal / base 10 values work. Each digit in base 10 can be anything from 0 to 9. The decimal value of 12 is two digits, a 1 and a 2. Likewise, the binary equivalent of this value contains 4 digits: 1100.
9th May 2018, 7:02 PM
David Carroll
David Carroll - avatar
+ 3
A binary has two vaules and is based off of base 2 instead of base 10 ( the regular everyday number ayatem)
22nd May 2018, 2:48 AM
Apple Blossom
Apple Blossom - avatar
+ 2
yes 0 and 1 with 8 of them you have a char(as far as i know)
8th May 2018, 6:40 PM
Lexfuturorum
Lexfuturorum - avatar
+ 2
Yes, binary is just base 2. Normally we use base 10 (0-9), but we can use any base is convenient for our applications. In computer science base 2 happens to be convenient. So does base 16 (0-9, a-f) and 8 (0-7).
8th May 2018, 7:36 PM
Vlad Serbu
Vlad Serbu - avatar