Uploaded October 2021 | Updated September 2026, 2 weeks ago
Support What's a Creel? on Patreon: patreon.com/whatsacreel
FaceBook: facebook.com/whatsacreel
Official Store: whats-a-creel-3.creator-spring.com
In this video we explore 11 bit hacks from beginner to advanced beautifully rendered in 3D and to the music of Chopin.
0:00 - Intro
1:03 - Set a bit
1:53 - Clear a bit
2:45 - Toggle a bit
3:38 - Convert trailing 0's to 1
4:33 - Extracting the least significant 1 bit
5:43 - Masked copy
7:03 - Swapping bits
8:30 - Population count
10:07 - Counting bit islands
13:07 - Bit scan forwards
16:44 - Next lexicographic permutation
Sources for the algorithms:
Stanford Bit Twiddling Hacks by Sean Eron Anderson
https://graphics.stanford.edu/~seander/bithacks.html
Matters Computational by Arndt, Jörg
E-Book: jjj.de/fxt/fxtbook.pdf
Hard copy: amazon.com/Matters-Computational-Ideas-Algorithms-Source/dp/3642147631
All music from the International Music Library Project: imslp.org/wiki/Main_Page
Chopin Waltz in C# Minor, Op. 64 No. 2, Piano: Olga Gurevich
Chopin Nocturne 2. Andante (E♭ major) , Piano: Aya Higuchi
Chopin Nocturne Op. 9 No. 1 in Bb Minor, Piano: Harald Vetter
Chopin Nocturne in F, Op. 15 No. 1, Piano: Luke Faulkner
Chopin Nocturne in F#, Op. 15 No. 2, Piano: Luke Faulkner
Background images from animations from HDRI Haven: hdrihaven.com
Software used to make this video:
Visual Studio 2019 Community: visualstudio.com/downloads
Blender: blender.org
Audacity: audacityteam.org
Davinci Resolve 16: blackmagicdesign.com/products/davinciresolve
OpenOffice: openoffice.org
Gimp: gimp.org
Support What's a Creel? on Patreon: patreon.com/whatsacreel
FaceBook: facebook.com/whatsacreel
Official Store: whats-a-creel-3.creator-spring.com
In this video we explore 11 bit hacks from beginner to advanced beautifully rendered in 3D and to the music of Chopin.
0:00 - Intro
1:03 - Set a bit
1:53 - Clear a bit
2:45 - Toggle a bit
3:38 - Convert trailing 0's to 1
4:33 - Extracting the least significant 1 bit
5:43 - Masked copy
7:03 - Swapping bits
8:30 - Population count
10:07 - Counting bit islands
13:07 - Bit scan forwards
16:44 - Next lexicographic permutation
Sources for the algorithms:
Stanford Bit Twiddling Hacks by Sean Eron Anderson
https://graphics.stanford.edu/~seander/bithacks.html
Matters Computational by Arndt, Jörg
E-Book: jjj.de/fxt/fxtbook.pdf
Hard copy: amazon.com/Matters-Computational-Ideas-Algorithms-Source/dp/3642147631
All music from the International Music Library Project: imslp.org/wiki/Main_Page
Chopin Waltz in C# Minor, Op. 64 No. 2, Piano: Olga Gurevich
Chopin Nocturne 2. Andante (E♭ major) , Piano: Aya Higuchi
Chopin Nocturne Op. 9 No. 1 in Bb Minor, Piano: Harald Vetter
Chopin Nocturne in F, Op. 15 No. 1, Piano: Luke Faulkner
Chopin Nocturne in F#, Op. 15 No. 2, Piano: Luke Faulkner
Background images from animations from HDRI Haven: hdrihaven.com
Software used to make this video:
Visual Studio 2019 Community: visualstudio.com/downloads
Blender: blender.org
Audacity: audacityteam.org
Davinci Resolve 16: blackmagicdesign.com/products/davinciresolve
OpenOffice: openoffice.org
Gimp: gimp.org







![AES Encryption 4: Matrix Multiplication
This is a short vid which shows the code for the matrix multiplication for the MixColumns step. I initially intended to make this vid and the previous AES one around the same length, but we actually covered almost everything in the previous vid!
Mix Columns Wikipedia Page:
https://en.wikipedia.org/wiki/Rijndael_mix_columns
Code for dot products:
tmp[0] = (unsigned char)(mul2[state[0]] ^ mul3[state[1]] ^ state[2] ^ state[3]);
tmp[1] = (unsigned char)(state[0] ^ mul2[state[1]] ^ mul3[state[2]] ^ state[3]);
tmp[2] = (unsigned char)(state[0] ^ state[1] ^ mul2[state[2]] ^ mul3[state[3]]);
tmp[3] = (unsigned char)(mul3[state[0]] ^ state[1] ^ state[2] ^ mul2[state[3]]);
tmp[4] = (unsigned char)(mul2[state[4]] ^ mul3[state[5]] ^ state[6] ^ state[7]);
tmp[5] = (unsigned char)(state[4] ^ mul2[state[5]] ^ mul3[state[6]] ^ state[7]);
tmp[6] = (unsigned char)(state[4] ^ state[5] ^ mul2[state[6]] ^ mul3[state[7]]);
tmp[7] = (unsigned char)(mul3[state[4]] ^ state[5] ^ state[6] ^ mul2[state[7]]);
tmp[8] = (unsigned char)(mul2[state[8]] ^ mul3[state[9]] ^ state[10] ^ state[11]);
tmp[9] = (unsigned char)(state[8] ^ mul2[state[9]] ^ mul3[state[10]] ^ state[11]);
tmp[10] = (unsigned char)(state[8] ^ state[9] ^ mul2[state[10]] ^ mul3[state[11]]);
tmp[11] = (unsigned char)(mul3[state[8]] ^ state[9] ^ state[10] ^ mul2[state[11]]);
tmp[12] = (unsigned char)(mul2[state[12]] ^ mul3[state[13]] ^ state[14] ^ state[15]);
tmp[13] = (unsigned char)(state[12] ^ mul2[state[13]] ^ mul3[state[14]] ^ state[15]);
tmp[14] = (unsigned char)(state[12] ^ state[13] ^ mul2[state[14]] ^ mul3[state[15]]);
tmp[15] = (unsigned char)(mul3[state[12]] ^ state[13] ^ state[14] ^ mul2[state[15]]);
Music Channel:
Sober:
https://youtu.be/Y2LCg3cGu7U
Gold Digger:
https://youtu.be/wAoXB8tg0co
Become a patron and support Whats a Creel programming vids on Patreon:
www.patreon.com/whatsacreel
FaceBook:
www.facebook.com/pages/WhatsaCreel/167732956665435 AES Encryption 4: Matrix Multiplication](https://i.ytimg.com/vi/bERjYzLqAfw/mqdefault.jpg)


