Загрузка страницы

The Easy Guide to Mastering Bit Manipulation in Embedded C - Part 2

Order your own PCB - PCBWay: https://pcbway.com/g/2NDSPg
Learn how to write more efficient code by using Bit Manipulation & Bit Masking in your Embedded projects by watching this intuitive explanation of the following bitwise operators: XOR, Left and Right Shifting

Texas Instruments MSP430 LaunchPad (US): https://amzn.to/3KzlePN

MSP430 Microcontroller Basics - Book (US): https://amzn.to/2OY8tDT

Last video: https://youtu.be/7LhsxYNAXvw
Follow me on Instagram : https://www.instagram.com/thefabytm_yt
Like me on Facebook : http://www.facebook.com/TheFabytm
Secondary Channel : http://www.youtube.com/MoreTheFabytm
Follow me on Twitter : http://www.Twitter.com/TheFabytm

Try Amazon Prime with a free 30 day trial: https://amzn.to/2MG3A0T

Sign up for Airalo (international eSIM plans): https://www.airalo.com/?rfsn=4268870.6cf0a4

0:00 Intro
1:12 What XOR & Bit Shifting are useful for
3:23 XOR operator
4:27 Bit Shifting
5:35 Multiplication and division - bit shifting
7:35 Logicical Shifting, Arithmetic Shifting, Rotating

My name is Fabi and I am an Engineer and Tech Enthusiast from Romania. On my YouTube channel I do thorough reviews of gadgets, showcase my programming projects and show you which cars I am driving.

In today's video we'll talk about bit manipulation and bit masking, more specifically, the XOR or exclusive or operator and bit shifting. In the first part of this video we discussed how to use AND, OR and the COMPLEMENT OPERATOR to read a single or multiple bits out of a register and write either a 1 or a 0 back in a register. It's very important to master these early as working with embedded involves a lot writing bits into registers and checking for bits out of registers. Additionally, bitwise operations are almost guaranteed to come up in technical interviews, due to how often they are used in day to day work by most embedded developers.

So, what would we use the XOR operator and bit shifting for? XOR is useful for toggling bits, XOR-ing with one will always flip the current value of the bit and bit shifting can be obviously used to shift bits from their current position to another desired position. Another, less obvious use is that it allows for very efficient multiplication and division if multiplying or dividing by a power of 2. Most microcontrollers actually have 3 types of shifting: logical shifting, arithmetic shifting and rotating.

Видео The Easy Guide to Mastering Bit Manipulation in Embedded C - Part 2 канала TheFabytm
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
28 апреля 2023 г. 20:04:20
00:09:29
Другие видео канала
How Low Power Modes Work + Current Measurements | Embedded Systems ExplainedHow Low Power Modes Work + Current Measurements | Embedded Systems ExplainedAll about In App Purchases : Why they suck and why people hate them!All about In App Purchases : Why they suck and why people hate them!I'm Golden Barrett.50calMW3:Ep10:Tips&Tricks, maps, Create-a-class(Road To Golden, Golden Gun Show)I'm Golden Barrett.50calMW3:Ep10:Tips&Tricks, maps, Create-a-class(Road To Golden, Golden Gun Show)Battleforge Passage to Darkness Expert Part 2Battleforge Passage to Darkness Expert Part 2Channel+MW3 updates(nostalgia mappack, FMG9s nerf), Your first FPS online game+what you liked at itChannel+MW3 updates(nostalgia mappack, FMG9s nerf), Your first FPS online game+what you liked at itThe Would you rather Show 2:Go back or into the future?Sexy GF that never fucks or ugly but slutty?The Would you rather Show 2:Go back or into the future?Sexy GF that never fucks or ugly but slutty?I'm Golden Type95 MW3:Ep9:Tips&Tricks, maps, Create-a-class combo(Road To Golden, Golden Gun Show)I'm Golden Type95 MW3:Ep9:Tips&Tricks, maps, Create-a-class combo(Road To Golden, Golden Gun Show)I'm Golden Dragunov MW3:Ep8:Tips&Tricks, maps, Create-a-class combo(Road To Golden, Golden Gun Show)I'm Golden Dragunov MW3:Ep8:Tips&Tricks, maps, Create-a-class combo(Road To Golden, Golden Gun Show)Towing a car in Just Cause 2Towing a car in Just Cause 2Split Second Episode 3 Full HD gameplaySplit Second Episode 3 Full HD gameplayThe WYR Show 3:Zoom vision or hearing?Less sleep or More sleep and control dreams?Solo or MP games?The WYR Show 3:Zoom vision or hearing?Less sleep or More sleep and control dreams?Solo or MP games?MoH Warfighter:Lacks WOW factor!Not really good!First impressions video!Medal Of Honor WarfighterMoH Warfighter:Lacks WOW factor!Not really good!First impressions video!Medal Of Honor WarfighterTop 3 Games coming out in 2013 ! Games I'm looking forward to in 2013!Top 3 Games coming out in 2013 ! Games I'm looking forward to in 2013!COD4:COD Marathon(all CODS in one day), Channel Update, How to play with me on XBL(commentary)COD4:COD Marathon(all CODS in one day), Channel Update, How to play with me on XBL(commentary)Complexity of the World we live in! Technology, Internet, Automation, Simplicity!Complexity of the World we live in! Technology, Internet, Automation, Simplicity!Battleforge rPvE, 4 player map, difficulty 9 part 2Battleforge rPvE, 4 player map, difficulty 9 part 2New Trent iCarrier IMP120D External Battery Pack - Full Review !New Trent iCarrier IMP120D External Battery Pack - Full Review !BenQ ScreenBar Monitor Light Review - Exciting Sub $100 AccessoryBenQ ScreenBar Monitor Light Review - Exciting Sub $100 AccessoryMotivation 101 : How to get motivated and stay motivated!Motivation 101 : How to get motivated and stay motivated!Holiday-Christmas Gaming Gift Guide 2012-Consoles, Handheld consoles, Xbox Kinect, PS Move, iOSHoliday-Christmas Gaming Gift Guide 2012-Consoles, Handheld consoles, Xbox Kinect, PS Move, iOSThe WYR Show ep7:Screw a baby or a corpse?Sniper or Air Force pilot?Eat or be eaten by a whale?The WYR Show ep7:Screw a baby or a corpse?Sniper or Air Force pilot?Eat or be eaten by a whale?
Яндекс.Метрика