This commit is contained in:
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
title: "Bit magic in C (and C++)"
|
title: "Bit magic in C (and C++)"
|
||||||
subtitle: ""
|
subtitle: ""
|
||||||
summary: ""
|
summary: "Tips and trick for embedded C/C++"
|
||||||
authors: []
|
authors: []
|
||||||
tags: []
|
tags: []
|
||||||
categories: []
|
categories: []
|
||||||
@ -76,7 +76,7 @@ output = input << 3; // Multiply by 8
|
|||||||
output = (0b1 << X) -1;
|
output = (0b1 << X) -1;
|
||||||
```
|
```
|
||||||
|
|
||||||
# Miccelean
|
# Miscellaneous
|
||||||
```c
|
```c
|
||||||
// Check if number is ODD
|
// Check if number is ODD
|
||||||
if( (num & 1) == 1) {};
|
if( (num & 1) == 1) {};
|
||||||
|
Reference in New Issue
Block a user