Converts a decimal number to its binary string representation. This is shorthand for CONV(num, 10, 2).
VARCHARDiperbarui: 13 Jun 2026BIN(num)The decimal number to convert
1 SELECT BIN(10) AS binary_str;
10 in decimal equals 1010 in binary.
1 SELECT BIN(255) AS binary_str;
255 in decimal equals 11111111 in binary.
1 SELECT value, BIN(value) AS bits, 2 LENGTH(BIN(value)) AS bit_count 3 FROM numbers;
Analyzes the binary representation of numbers.
Sudah paham BIN? Latih langsung di browser
Latihan interaktif, langsung di browser.