From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/gcc~13/binary-constants.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 devdocs/gcc~13/binary-constants.html (limited to 'devdocs/gcc~13/binary-constants.html') diff --git a/devdocs/gcc~13/binary-constants.html b/devdocs/gcc~13/binary-constants.html new file mode 100644 index 00000000..90974191 --- /dev/null +++ b/devdocs/gcc~13/binary-constants.html @@ -0,0 +1,10 @@ +

6.65 Binary Constants using the ‘0b’ Prefix

Integer constants can be written as binary constants, consisting of a sequence of ‘0’ and ‘1’ digits, prefixed by ‘0b’ or ‘0B’. This is particularly useful in environments that operate a lot on the bit level (like microcontrollers).

The following statements are identical:

i =       42;
+i =     0x2a;
+i =      052;
+i = 0b101010;
+

The type of these constants follows the same rules as for octal or hexadecimal integer constants, so suffixes like ‘L’ or ‘UL’ can be applied.

+

+ © Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
+ https://gcc.gnu.org/onlinedocs/gcc-13.1.0/gcc/Binary-constants.html +

+
-- cgit v1.2.3