Bit Masking Made Easy – Convert Decimal to Binary (advanced programming)

preview_player
Показать описание
Bit masking is an advanced programming technique. In this example, I show you how to use a bitmask in C in order to determine the bit pattern of a specific byte (a number or a character).

MORE LESSONS
=============
To follow all this series on bits, bytes and binary numbers, go to the “Down To The Metal” playlist:

Lessons on specific topics:

Why Do Big Numbers Turn Negative?

What is a Binary Number?

Bits, Bytes and Binary Numbers:

Be sure to subscribe to the Code With Huw channel so that you get a notification when I upload more lessons in this series.

PROGRAMMING BOOKS
====================
If you want to learn programming in more depth (and also support this channel!) you might think of buying one of my books. I have written books on C programming, Using Pointers in C, Recursion and other programming topics. You can buy my books (paperback or Kindle) on Amazon.

“CODE WITH HUW” ON TWITTER:
=================================

“CODE WITH HUW” ON FACEBOOK:
=================================

Good luck! And good programming!
Рекомендации по теме
Комментарии
Автор

The ternary conditional operation returns values — it doesn’t “do” anything [reference 5:30]; however, if you need to perform work based on the result of a given condition, you can encapsulate your code in a statement expression (or is it an expression statement?)or you can encapsulate your code in a block (Blocks.h).

jamesbush
Автор

this was so helpful in solving the "bulbs" problem in CS50. Thanks a lot sir!

adityakharbanda
Автор

Im glad I found your channel. Thank you very much!

j-p-d-e-v
Автор

Great explanation. You made it look so easy. Thanks a lot

khetanshusingh
Автор

Thank you! This video was very comprehensible and helpful!

znoran
Автор

Thank you that really illustrates the idea

enaskhaled
Автор

I'd like to see a video about UTF-8 strings in C.

ikemkrueger
Автор

You could have just written “c & mask” without the ternary conditional. That it is shorthand for the traditional if-else clause is not relevant; that it can be abbreviated to just an else clause would be interesting to note, though.

jamesbush
Автор

"advanced orogramming" ...you're just saying that to make me feel better aren't you.

ratslaydownflat
welcome to shbcf.ru