Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

How to Swap two numbers without using third variable? Bit Manipulation Interview - XOR

Автор: Firmware

Загружено: 2021-11-13

Просмотров: 993

Описание:

In this video, we look into an XOR property that helps us swap two numbers using bit manipulations without requiring a third variable in C/C++. This is a commonly asked interview question for software/firmware /embedded roles.
There are other methods available to do the same, such as a combination of multiplication - division, or addition-subtraction. But these methods have a disadvantage against using XOR. For using addition or multiplication, we would have to limit the range of input, else the resultants could go out of range.
Also, a helpful insight that we find through this problem is the associative property and commutative property of XOR operations.

Must know concepts of XOR:    • Must know concepts of XOR -  Bit Manipulat...  
Bit Manipulation basic techniques:    • Bit Manipulation - Three most used functio...  

See Bit Manipulation Interview Preparation Series here:
   • Bit Manipulation Interview Series  

#XOR #BitManipulation #BitAlgorithm

You may follow us on Facebook and Instagram:
Facebook :   / firmwarecode  
Instagram :   / firmwarecode  

How to Swap two numbers without using third variable?   Bit Manipulation Interview - XOR

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

array(0) { }

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]