Nibble swap of byte in Java
Автор: Computer Sector
Загружено: 2026-01-22
Просмотров: 7
Hello Viewers,
In this video I have explained what is nibble and how to swap it using & and shift operator.
A nibble is 4 bits (half of a byte).
A byte has 8 bits = 2 nibbles:
High nibble → left 4 bits
Low nibble → right 4 bits
Nibble swap means exchanging the high nibble and low nibble of a byte.
0x12 = 0001 0010
↑↑↑↑ ↑↑↑↑
high low
nibble nibble
After Swap
0x21 = 0010 0001
Thanks!!
Bye
#programming #happycoding #javaprogramming #java #javatutorial #coding #code #computersector
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: