SlideShare une entreprise Scribd logo
1  sur  12
BOOLEAN INSTRUCTIONS CLR,CPL,SETB,AND,OR
BOOLEAN INSTRUCTIONS This group of instructions is associated with the single-bit operations of the 8051. This group allows manipulating the individual bits of bit addressable registers and memory locations as well as the CY flag. The P, OV, and AC flags cannot be directly altered. This group includes: Set, clear, and, or complement, move. Conditional jumps.
CLR <bit> CLR C CLR instruction can operate on the carry flag CLR C  The CARRY flag is set to 0 CLR bit CLR instruction can operate on any directly addressable     bit CLR P2.7 If Port 2 has been previously written with DCH (11011100), then the operation leaves the port set to 5CH (01011100)
SETB <bit> SETB C SETB instruction operates on the carry flag and sets the specified bit to 1 SETB C sets the carry flag to 1  SETB bit SETB instruction operates on any    directly-addressable bit and sets the specified bit to 1 SETB P2.0 Port 2 has the value of 24H (00100100), the Port 2 value changes to 25H (00100101)
CPL <bit> CPL C This operation complements the carry flag CPL C CPL bit CPL instruction complements any directly addressable Bit CPL P2.2 If Port 2 has the value of 53H (01010011) then after the execution the port set to 55H (01010101)
ANL ANL C, <source-bit> This instruction ANDs the bit addressed with the carry bit and stores the result in the carry bit itself ANL C,P2.7 ;AND carry flag with bit 7 of P2 ANL C, /<source-bit> If a slash (/) is used in the source operand bit, the logical complement of the source bit is used, but the source bit itself is not affected ANL C,/OV ;AND with inverse of OV flag
ORL ORL C, <source-bit> This instruction ORs the bit addressed with the carry bit and stores the result in the carry bit itself ORL C,P2.5 ;OR carry flag with bit 5 of P2 ORL C, /<source-bit> If a slash (/) is used in the source operand bit, the logical complement of the source bit is used, but the source bit itself is not affected ORL C,/OV ;OR with inverse of OV flag
MOV <dest-bit>,<source-bit> One of the operands must be the carry flag; the other may be any directly-addressable bit MOV C,P3.3 MOV P2.0,C If P2=C5H (11000101), P3.3=0 and CY=1 initially, after instructions,   	P2=C4H (11000100) and CY=0
JC / JNC addr Jump to a relative address if CY is set / cleared.
JB / JNB <bit>,addr Jump to a relative address if a bit is set / cleared.
JBC <bit>,addr Jump to a relative address if a bit is set and clear the bit.  JBC P1.3,ARRAY1 If P1=56H (01010110), the above instruction sequence will cause the program to branch to the instruction at ARRAY1, modifying P1 to 52H (01010010)

Contenu connexe

Tendances

8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
Prof. Swapnil V. Kaware
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
Muthu Manickam
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
Dr.YNM
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
Dr.YNM
 

Tendances (20)

8051 memory
8051 memory8051 memory
8051 memory
 
8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware8051 Microcontroller PPT's By Er. Swapnil Kaware
8051 Microcontroller PPT's By Er. Swapnil Kaware
 
Memory organization of 8051
Memory organization of 8051Memory organization of 8051
Memory organization of 8051
 
Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...Interfacing with peripherals: analog to digital converters and digital to ana...
Interfacing with peripherals: analog to digital converters and digital to ana...
 
8051 ch9-950217
8051 ch9-9502178051 ch9-950217
8051 ch9-950217
 
Addressing modes
Addressing modesAddressing modes
Addressing modes
 
8096 microcontrollers notes
8096 microcontrollers notes8096 microcontrollers notes
8096 microcontrollers notes
 
8257 DMA Controller
8257 DMA Controller8257 DMA Controller
8257 DMA Controller
 
Serial Communication in 8051
Serial Communication in 8051Serial Communication in 8051
Serial Communication in 8051
 
Microcontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programmingMicrocontroller pic 16f877 addressing modes instructions and programming
Microcontroller pic 16f877 addressing modes instructions and programming
 
8051 Microcontroller Notes
8051 Microcontroller Notes8051 Microcontroller Notes
8051 Microcontroller Notes
 
8051 Timers and Counters
8051 Timers and Counters8051 Timers and Counters
8051 Timers and Counters
 
Architecture of 8051
Architecture of 8051Architecture of 8051
Architecture of 8051
 
Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)Timer counter in arm7(lpc2148)
Timer counter in arm7(lpc2148)
 
8051 timer counter
8051 timer counter8051 timer counter
8051 timer counter
 
Addressing modes of 8086
Addressing modes of 8086Addressing modes of 8086
Addressing modes of 8086
 
DAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdfDAC Interfacing with 8051.pdf
DAC Interfacing with 8051.pdf
 
8051 interfacing
8051 interfacing8051 interfacing
8051 interfacing
 
8051 Timer
8051 Timer8051 Timer
8051 Timer
 
8155 PPI
8155 PPI8155 PPI
8155 PPI
 

Similaire à boolean 8051

08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa1608 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
John Todora
 
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
alinainglis
 
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptxWINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
SrinivasanUma1
 
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programmingEmbedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programming
Ikhwan_Fakrudin
 

Similaire à boolean 8051 (20)

Uc 2(vii)
Uc 2(vii)Uc 2(vii)
Uc 2(vii)
 
Lecture 4 (8051 instruction set) rv01
Lecture 4 (8051 instruction set) rv01Lecture 4 (8051 instruction set) rv01
Lecture 4 (8051 instruction set) rv01
 
74LS47 / DM74LS47 Datasheet PDF
74LS47 / DM74LS47 Datasheet PDF74LS47 / DM74LS47 Datasheet PDF
74LS47 / DM74LS47 Datasheet PDF
 
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa1608 chapter03 06_status_bits_otl_otu_scan_logic_fa16
08 chapter03 06_status_bits_otl_otu_scan_logic_fa16
 
The 8051 microcontroller
The 8051 microcontrollerThe 8051 microcontroller
The 8051 microcontroller
 
Hemanth143
Hemanth143 Hemanth143
Hemanth143
 
8085 lab
8085 lab8085 lab
8085 lab
 
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
7447_datasheet.pdf© 2001 Fairchild Semiconductor Corporati.docx
 
8051 data type and directives
8051 data type and directives8051 data type and directives
8051 data type and directives
 
8051 data types and directives
8051 data types and directives8051 data types and directives
8051 data types and directives
 
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptxWINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
WINSEM2023-24_BECE204L_TH_VL2023240505625_2024-01-29_Reference-Material-I.pptx
 
MICROCONTROLLER .pptx
MICROCONTROLLER .pptxMICROCONTROLLER .pptx
MICROCONTROLLER .pptx
 
8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt
 
Embedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programmingEmbedded system (Chapter 3) io_port_programming
Embedded system (Chapter 3) io_port_programming
 
Embedded systems io programming
Embedded systems   io programmingEmbedded systems   io programming
Embedded systems io programming
 
Ladder
LadderLadder
Ladder
 
8155 GPPI
8155 GPPI8155 GPPI
8155 GPPI
 
Microprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 FeaturesMicroprocessor Interfacing and 8155 Features
Microprocessor Interfacing and 8155 Features
 
1203 Ppi 8155
1203 Ppi 81551203 Ppi 8155
1203 Ppi 8155
 
8051 Interrupts
8051 Interrupts8051 Interrupts
8051 Interrupts
 

Plus de VJ Aiswaryadevi (15)

8051
80518051
8051
 
memory 8051
memory  8051memory  8051
memory 8051
 
logical 8051
logical 8051logical 8051
logical 8051
 
interrupts
interruptsinterrupts
interrupts
 
mup
mupmup
mup
 
branch ins 8051
branch ins 8051branch ins 8051
branch ins 8051
 
arithmetic ins in 8051
arithmetic ins in 8051arithmetic ins in 8051
arithmetic ins in 8051
 
8051 archi
8051 archi8051 archi
8051 archi
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
8051 microprocessor
8051 microprocessor8051 microprocessor
8051 microprocessor
 
Groupware
GroupwareGroupware
Groupware
 
Db
DbDb
Db
 
302 B+Tree Ind Hash
302 B+Tree Ind Hash302 B+Tree Ind Hash
302 B+Tree Ind Hash
 
storage media
storage mediastorage media
storage media
 
B Trees
B TreesB Trees
B Trees
 

Dernier

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Dernier (20)

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
 
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
 
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
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
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
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
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
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
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.
 
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Ă...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.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_...
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 

boolean 8051

  • 1.
  • 3. BOOLEAN INSTRUCTIONS This group of instructions is associated with the single-bit operations of the 8051. This group allows manipulating the individual bits of bit addressable registers and memory locations as well as the CY flag. The P, OV, and AC flags cannot be directly altered. This group includes: Set, clear, and, or complement, move. Conditional jumps.
  • 4. CLR <bit> CLR C CLR instruction can operate on the carry flag CLR C The CARRY flag is set to 0 CLR bit CLR instruction can operate on any directly addressable bit CLR P2.7 If Port 2 has been previously written with DCH (11011100), then the operation leaves the port set to 5CH (01011100)
  • 5. SETB <bit> SETB C SETB instruction operates on the carry flag and sets the specified bit to 1 SETB C sets the carry flag to 1 SETB bit SETB instruction operates on any directly-addressable bit and sets the specified bit to 1 SETB P2.0 Port 2 has the value of 24H (00100100), the Port 2 value changes to 25H (00100101)
  • 6. CPL <bit> CPL C This operation complements the carry flag CPL C CPL bit CPL instruction complements any directly addressable Bit CPL P2.2 If Port 2 has the value of 53H (01010011) then after the execution the port set to 55H (01010101)
  • 7. ANL ANL C, <source-bit> This instruction ANDs the bit addressed with the carry bit and stores the result in the carry bit itself ANL C,P2.7 ;AND carry flag with bit 7 of P2 ANL C, /<source-bit> If a slash (/) is used in the source operand bit, the logical complement of the source bit is used, but the source bit itself is not affected ANL C,/OV ;AND with inverse of OV flag
  • 8. ORL ORL C, <source-bit> This instruction ORs the bit addressed with the carry bit and stores the result in the carry bit itself ORL C,P2.5 ;OR carry flag with bit 5 of P2 ORL C, /<source-bit> If a slash (/) is used in the source operand bit, the logical complement of the source bit is used, but the source bit itself is not affected ORL C,/OV ;OR with inverse of OV flag
  • 9. MOV <dest-bit>,<source-bit> One of the operands must be the carry flag; the other may be any directly-addressable bit MOV C,P3.3 MOV P2.0,C If P2=C5H (11000101), P3.3=0 and CY=1 initially, after instructions, P2=C4H (11000100) and CY=0
  • 10. JC / JNC addr Jump to a relative address if CY is set / cleared.
  • 11. JB / JNB <bit>,addr Jump to a relative address if a bit is set / cleared.
  • 12. JBC <bit>,addr Jump to a relative address if a bit is set and clear the bit. JBC P1.3,ARRAY1 If P1=56H (01010110), the above instruction sequence will cause the program to branch to the instruction at ARRAY1, modifying P1 to 52H (01010010)