What does BIN do?

Hello all,

I am currently looking at someone elses code and was wondering if anyone could tell me what BIN argument does?

For instance:

 Serial.print(c, BIN);

I'm willing to bet that, if you printed the value of BIN, it would be perfectly obvious what it does.

The documentation for the Serial.print() function bears looking at, too.

It's a constant that tells it to print output in base 2 instead of base 10 (the default) - it's all described in the documentation, which is a great first place to look before posting for help.

https://www.arduino.cc/reference/en/language/functions/communication/serial/print/