SlideShare une entreprise Scribd logo
1  sur  19
Computer Programming
Basic of Bits
• In C "A bit field is set up with a structure
declaration that labels each field and
determines its width."
Bit operator
Shift operator
• There are two types of operator used in c
language.
• Left shit operator (<<)
• Right shift operator (>>)
Left shift operator
Right shift operator
Bit field
• A bit field is a term used in comp
programming to store multiple, logical
where each of the sets of bits, and
single bit can be addressed.
Cont,,
Bit Fields allow the packing of data in a structure. This is especially useful when memory or data storage
is at a premium. Typical examples:
Packing several objects into a machine word. e.g. 1 bit flags can be compacted -- Symbol tables in
compilers.
Reading external file formats -- non-standard file formats could be read in. E.g. 9 bit integers.
C lets us do this in a structure definition by putting :bit length after the variable. i.e.
struct packed_struct { unsigned int f1:1; unsigned int f2:1; unsigned int f3:1; unsigned int f4:1; unsigned int
type:4; unsigned int funny_int:9; } pack;
Here the packed_struct contains 6 members: Four 1 bit flags f1..f3, a 4 bit type and a 9 bit funny_int.
C automatically packs the above bit fields as compactly as possible, provided that the maximum length of
the field is less than or equal to the integer word length of the computer. If this is not the case then
some compilers may allow memory overlap for the fields whilst other would store the next field in the
next word (see comments on bit fiels portability below).
Access members as usual via:
pack.type = 7;
Bit field declaration
Cont,,
Rotating bits
If I were to try and `rotateRight(5):
y becomes 11111110
z becomes 01100000
Then g becomes 111111110
Bits, Bits operator, bitwise function

Contenu connexe

Tendances

Model Fields in Odoo 15
 Model Fields in Odoo 15 Model Fields in Odoo 15
Model Fields in Odoo 15Celine George
 
Coa unit 3 part 2 cisc vs risc
Coa unit 3 part 2 cisc vs riscCoa unit 3 part 2 cisc vs risc
Coa unit 3 part 2 cisc vs riscTMSYTutorials
 
Conference presentation final
Conference presentation finalConference presentation final
Conference presentation finalALYAA AL-BARRAK
 
Odoo ORM Methods | Object Relational Mapping in Odoo15
Odoo ORM Methods | Object Relational Mapping in Odoo15 Odoo ORM Methods | Object Relational Mapping in Odoo15
Odoo ORM Methods | Object Relational Mapping in Odoo15 Celine George
 
Pi - System Programming Language
Pi - System Programming LanguagePi - System Programming Language
Pi - System Programming LanguagePhilip
 
instruction set Architecture.....(ISA)
instruction set Architecture.....(ISA)instruction set Architecture.....(ISA)
instruction set Architecture.....(ISA)Rao Mubashar
 
FNR : Arbitrary length small domain block cipher proposal
FNR : Arbitrary length small domain block cipher proposalFNR : Arbitrary length small domain block cipher proposal
FNR : Arbitrary length small domain block cipher proposalSashank Dara
 
RELATION BETWEEN DATA WORD SIZE AND INSTRUCTION WORD SIZE- Dspa word size
RELATION BETWEEN DATA WORD SIZE AND INSTRUCTION WORD SIZE- Dspa word sizeRELATION BETWEEN DATA WORD SIZE AND INSTRUCTION WORD SIZE- Dspa word size
RELATION BETWEEN DATA WORD SIZE AND INSTRUCTION WORD SIZE- Dspa word sizeNITHIN KALLE PALLY
 
Ppt fnr arbitrary length small domain block cipher proposal
Ppt fnr  arbitrary length small domain block cipher proposalPpt fnr  arbitrary length small domain block cipher proposal
Ppt fnr arbitrary length small domain block cipher proposalKarunakar Saroj
 

Tendances (12)

Model Fields in Odoo 15
 Model Fields in Odoo 15 Model Fields in Odoo 15
Model Fields in Odoo 15
 
Coa unit 3 part 2 cisc vs risc
Coa unit 3 part 2 cisc vs riscCoa unit 3 part 2 cisc vs risc
Coa unit 3 part 2 cisc vs risc
 
Conference presentation final
Conference presentation finalConference presentation final
Conference presentation final
 
Odoo ORM Methods | Object Relational Mapping in Odoo15
Odoo ORM Methods | Object Relational Mapping in Odoo15 Odoo ORM Methods | Object Relational Mapping in Odoo15
Odoo ORM Methods | Object Relational Mapping in Odoo15
 
Pi - System Programming Language
Pi - System Programming LanguagePi - System Programming Language
Pi - System Programming Language
 
Ai popular search algorithms
Ai   popular search algorithmsAi   popular search algorithms
Ai popular search algorithms
 
instruction set Architecture.....(ISA)
instruction set Architecture.....(ISA)instruction set Architecture.....(ISA)
instruction set Architecture.....(ISA)
 
06 mips-isa
06 mips-isa06 mips-isa
06 mips-isa
 
7
77
7
 
FNR : Arbitrary length small domain block cipher proposal
FNR : Arbitrary length small domain block cipher proposalFNR : Arbitrary length small domain block cipher proposal
FNR : Arbitrary length small domain block cipher proposal
 
RELATION BETWEEN DATA WORD SIZE AND INSTRUCTION WORD SIZE- Dspa word size
RELATION BETWEEN DATA WORD SIZE AND INSTRUCTION WORD SIZE- Dspa word sizeRELATION BETWEEN DATA WORD SIZE AND INSTRUCTION WORD SIZE- Dspa word size
RELATION BETWEEN DATA WORD SIZE AND INSTRUCTION WORD SIZE- Dspa word size
 
Ppt fnr arbitrary length small domain block cipher proposal
Ppt fnr  arbitrary length small domain block cipher proposalPpt fnr  arbitrary length small domain block cipher proposal
Ppt fnr arbitrary length small domain block cipher proposal
 

En vedette

Global variables, sorting static variables,function and arrays,
Global variables, sorting static variables,function and arrays,Global variables, sorting static variables,function and arrays,
Global variables, sorting static variables,function and arrays,Ahmad55ali
 
Programas Comerciales para Simulación de Procesos Químicos
Programas Comerciales para Simulación de Procesos QuímicosProgramas Comerciales para Simulación de Procesos Químicos
Programas Comerciales para Simulación de Procesos QuímicosILIANA HERNÁNDEZ
 
Manual de Buenas Prácticas y Reglamento de Funcionamiento para las Oficinas d...
Manual de Buenas Prácticas y Reglamento de Funcionamiento para las Oficinas d...Manual de Buenas Prácticas y Reglamento de Funcionamiento para las Oficinas d...
Manual de Buenas Prácticas y Reglamento de Funcionamiento para las Oficinas d...Francisco Javier Duran
 
Pautas en los principios constitucionales como solución a los problemas de fi...
Pautas en los principios constitucionales como solución a los problemas de fi...Pautas en los principios constitucionales como solución a los problemas de fi...
Pautas en los principios constitucionales como solución a los problemas de fi...Francisco Javier Duran
 
Qatar Country Risk
Qatar Country RiskQatar Country Risk
Qatar Country RiskHumanWare
 
Pakistan state Oil (PSO)
Pakistan state Oil (PSO)Pakistan state Oil (PSO)
Pakistan state Oil (PSO)diaryinc
 
Pso introduction
Pso introductionPso introduction
Pso introductionrutika12345
 
Pakistan State Oil Company Limited
Pakistan State Oil Company LimitedPakistan State Oil Company Limited
Pakistan State Oil Company LimitedFahad Iqbal
 

En vedette (20)

Global variables, sorting static variables,function and arrays,
Global variables, sorting static variables,function and arrays,Global variables, sorting static variables,function and arrays,
Global variables, sorting static variables,function and arrays,
 
Manejo integrado de_papa[1]
Manejo integrado de_papa[1]Manejo integrado de_papa[1]
Manejo integrado de_papa[1]
 
Presentación1
Presentación1Presentación1
Presentación1
 
I migliori Spot 2016
I migliori Spot 2016I migliori Spot 2016
I migliori Spot 2016
 
summer-internship-report-2015
summer-internship-report-2015summer-internship-report-2015
summer-internship-report-2015
 
Trabajo final-abel (3)
Trabajo final-abel (3)Trabajo final-abel (3)
Trabajo final-abel (3)
 
Trabajo final-abel
Trabajo final-abelTrabajo final-abel
Trabajo final-abel
 
Programas Comerciales para Simulación de Procesos Químicos
Programas Comerciales para Simulación de Procesos QuímicosProgramas Comerciales para Simulación de Procesos Químicos
Programas Comerciales para Simulación de Procesos Químicos
 
Manual de Buenas Prácticas y Reglamento de Funcionamiento para las Oficinas d...
Manual de Buenas Prácticas y Reglamento de Funcionamiento para las Oficinas d...Manual de Buenas Prácticas y Reglamento de Funcionamiento para las Oficinas d...
Manual de Buenas Prácticas y Reglamento de Funcionamiento para las Oficinas d...
 
Pautas en los principios constitucionales como solución a los problemas de fi...
Pautas en los principios constitucionales como solución a los problemas de fi...Pautas en los principios constitucionales como solución a los problemas de fi...
Pautas en los principios constitucionales como solución a los problemas de fi...
 
Presentación
PresentaciónPresentación
Presentación
 
Engargolado
EngargoladoEngargolado
Engargolado
 
Pso
PsoPso
Pso
 
PSO internship
PSO internshipPSO internship
PSO internship
 
Qatar Country Risk
Qatar Country RiskQatar Country Risk
Qatar Country Risk
 
Pso(oda)
Pso(oda)Pso(oda)
Pso(oda)
 
Pakistan state Oil (PSO)
Pakistan state Oil (PSO)Pakistan state Oil (PSO)
Pakistan state Oil (PSO)
 
Pso introduction
Pso introductionPso introduction
Pso introduction
 
PSO
PSOPSO
PSO
 
Pakistan State Oil Company Limited
Pakistan State Oil Company LimitedPakistan State Oil Company Limited
Pakistan State Oil Company Limited
 

Similaire à Bits, Bits operator, bitwise function (20)

Embedded C - Lecture 4
Embedded C - Lecture 4Embedded C - Lecture 4
Embedded C - Lecture 4
 
8871077.ppt
8871077.ppt8871077.ppt
8871077.ppt
 
A nice 64-bit error in C
A  nice 64-bit error in CA  nice 64-bit error in C
A nice 64-bit error in C
 
C interview questions
C interview questionsC interview questions
C interview questions
 
Chapter 1SyllabusCatalog Description Computer structu
Chapter 1SyllabusCatalog Description Computer structuChapter 1SyllabusCatalog Description Computer structu
Chapter 1SyllabusCatalog Description Computer structu
 
10 -bits_and_bytes
10  -bits_and_bytes10  -bits_and_bytes
10 -bits_and_bytes
 
C som-programmeringssprog-bt
C som-programmeringssprog-btC som-programmeringssprog-bt
C som-programmeringssprog-bt
 
Embedded c
Embedded cEmbedded c
Embedded c
 
C programming unit 01
C programming unit 01C programming unit 01
C programming unit 01
 
Notes of programming
Notes of programmingNotes of programming
Notes of programming
 
C –FAQ:
C –FAQ:C –FAQ:
C –FAQ:
 
mdc_ppt
mdc_pptmdc_ppt
mdc_ppt
 
C programming session10
C programming  session10C programming  session10
C programming session10
 
C- language Lecture 6
C- language Lecture 6C- language Lecture 6
C- language Lecture 6
 
Advanced+pointers
Advanced+pointersAdvanced+pointers
Advanced+pointers
 
Embedded C programming session10
Embedded C programming  session10Embedded C programming  session10
Embedded C programming session10
 
Clanguage
ClanguageClanguage
Clanguage
 
Advanced Microprocessors
Advanced MicroprocessorsAdvanced Microprocessors
Advanced Microprocessors
 
C programming language
C programming languageC programming language
C programming language
 
Quiz 9
Quiz 9Quiz 9
Quiz 9
 

Dernier

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxmarlenawright1
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...ZurliaSoop
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxDr. Ravikiran H M Gowda
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...pradhanghanshyam7136
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Association for Project Management
 

Dernier (20)

How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...Making communications land - Are they received and understood as intended? we...
Making communications land - Are they received and understood as intended? we...
 

Bits, Bits operator, bitwise function

  • 2. Basic of Bits • In C "A bit field is set up with a structure declaration that labels each field and determines its width."
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Shift operator • There are two types of operator used in c language. • Left shit operator (<<) • Right shift operator (>>)
  • 10.
  • 12.
  • 13.
  • 14. Bit field • A bit field is a term used in comp programming to store multiple, logical where each of the sets of bits, and single bit can be addressed.
  • 15. Cont,, Bit Fields allow the packing of data in a structure. This is especially useful when memory or data storage is at a premium. Typical examples: Packing several objects into a machine word. e.g. 1 bit flags can be compacted -- Symbol tables in compilers. Reading external file formats -- non-standard file formats could be read in. E.g. 9 bit integers. C lets us do this in a structure definition by putting :bit length after the variable. i.e. struct packed_struct { unsigned int f1:1; unsigned int f2:1; unsigned int f3:1; unsigned int f4:1; unsigned int type:4; unsigned int funny_int:9; } pack; Here the packed_struct contains 6 members: Four 1 bit flags f1..f3, a 4 bit type and a 9 bit funny_int. C automatically packs the above bit fields as compactly as possible, provided that the maximum length of the field is less than or equal to the integer word length of the computer. If this is not the case then some compilers may allow memory overlap for the fields whilst other would store the next field in the next word (see comments on bit fiels portability below). Access members as usual via: pack.type = 7;
  • 18. Rotating bits If I were to try and `rotateRight(5): y becomes 11111110 z becomes 01100000 Then g becomes 111111110