Skip to content

BIN

Syntax

BIN <binary numbeŕ>

Description

BIN is used to denote a binary number. It exists mostly for compatibility reasons with Sinclair BASIC. You can denote a binary number by prefixing it with BIN, but also using the % prefix or the b suffix.

For example, the number 5 can be denoted as follows:

  • BIN 101
  • 101b
  • %101

These three expressions are equivalent.

Remarks

  • This keyword is 100% Sinclair BASIC Compatible
  • Binary numbers are always considered unsigned integers and the type depends on the size of the number.