SlideShare a Scribd company logo
1 of 8
Embedded system
Lab
18ECL66
R L JALAPPA INSTITUTE OF TECHNOLOGY
Kodigehalli, Doddaballapur – 561 203
D A Lavanya Vaishnavi
Assistant Professor
Department of Electronics and communication Engineering
“
PART - A
ALP to find the number of 0’s and 1’s in a 32 bit data.
AREA program,CODE,READONLY
ENTRY
EXPORT __main
__main
MOV R0,#0xabcd ; Register Rd
MOV R1,#0x1F ; Counter register
L1 MOVS R0,R0,LSR #1 ; Logical right shift of number
ADDCS R3,R3,#1 ; R3 holds number of ones
ADDCC R4,R4,#1 ; R4 holds number of zeros
SUB R1,R1,#1 ; decrementing counter value
CMP R1,#00
BNE L1
stop
END
Calculations
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1
Total number of 0’s : 𝟏𝟎𝒅 = 𝑨𝒉
Total number of 1’s : 𝟐𝟐𝒅 = 𝟏𝟓𝒉
RESULT
“
“
THANK-U

More Related Content

Similar to Finding the number of 0's and 1's in a 32-bit data using an ARM assembly program

Automatic_room_light_controller_ PPT.pptx
Automatic_room_light_controller_ PPT.pptxAutomatic_room_light_controller_ PPT.pptx
Automatic_room_light_controller_ PPT.pptxSwarajDhumal
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operationNikhil Pandit
 
microprocessor_labbmet.pdf
microprocessor_labbmet.pdfmicroprocessor_labbmet.pdf
microprocessor_labbmet.pdfYadav Raj
 
Unit ii microcontrollers final
Unit ii microcontrollers finalUnit ii microcontrollers final
Unit ii microcontrollers finalSARITHA REDDY
 
Lec2.ppt
Lec2.pptLec2.ppt
Lec2.pptfgjf1
 
Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary janicetiong
 
22 micropl csandhmi_04_21
22 micropl csandhmi_04_2122 micropl csandhmi_04_21
22 micropl csandhmi_04_21Oskitar Gabriel
 
Computer Organization
Computer OrganizationComputer Organization
Computer OrganizationHaripritha
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manualDhaval Shukla
 
ARDUINO BASED TIME AND TEMPERATURE DISPLAY
ARDUINO BASED TIME AND TEMPERATURE DISPLAY ARDUINO BASED TIME AND TEMPERATURE DISPLAY
ARDUINO BASED TIME AND TEMPERATURE DISPLAY ajit kumar singh
 
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptxSatish Chandra
 

Similar to Finding the number of 0's and 1's in a 32-bit data using an ARM assembly program (20)

Lcd interfacing1
Lcd interfacing1Lcd interfacing1
Lcd interfacing1
 
Microcontrollers
MicrocontrollersMicrocontrollers
Microcontrollers
 
Emb day2 8051
Emb day2 8051Emb day2 8051
Emb day2 8051
 
Automatic_room_light_controller_ PPT.pptx
Automatic_room_light_controller_ PPT.pptxAutomatic_room_light_controller_ PPT.pptx
Automatic_room_light_controller_ PPT.pptx
 
Register transfer and micro-operation
Register transfer and micro-operationRegister transfer and micro-operation
Register transfer and micro-operation
 
8051 FINIAL
8051 FINIAL8051 FINIAL
8051 FINIAL
 
design of accumlator
design of accumlatordesign of accumlator
design of accumlator
 
Microprocessor lab
Microprocessor labMicroprocessor lab
Microprocessor lab
 
microprocessor_labbmet.pdf
microprocessor_labbmet.pdfmicroprocessor_labbmet.pdf
microprocessor_labbmet.pdf
 
Assembler Numerical in system programming
Assembler Numerical in system programmingAssembler Numerical in system programming
Assembler Numerical in system programming
 
Unit ii microcontrollers final
Unit ii microcontrollers finalUnit ii microcontrollers final
Unit ii microcontrollers final
 
Lec2.ppt
Lec2.pptLec2.ppt
Lec2.ppt
 
multiplexer and d-multiplexer
multiplexer and d-multiplexermultiplexer and d-multiplexer
multiplexer and d-multiplexer
 
LCD WITH 8051.docx
LCD WITH 8051.docxLCD WITH 8051.docx
LCD WITH 8051.docx
 
Instruction set summary
Instruction set summary Instruction set summary
Instruction set summary
 
22 micropl csandhmi_04_21
22 micropl csandhmi_04_2122 micropl csandhmi_04_21
22 micropl csandhmi_04_21
 
Computer Organization
Computer OrganizationComputer Organization
Computer Organization
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manual
 
ARDUINO BASED TIME AND TEMPERATURE DISPLAY
ARDUINO BASED TIME AND TEMPERATURE DISPLAY ARDUINO BASED TIME AND TEMPERATURE DISPLAY
ARDUINO BASED TIME AND TEMPERATURE DISPLAY
 
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
1 Unit-1 DEC B.Tech ECE III Sem Syllabus & Intro.pptx
 

Recently uploaded

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxupamatechverse
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escortsranjana rawat
 

Recently uploaded (20)

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
Introduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptxIntroduction and different types of Ethernet.pptx
Introduction and different types of Ethernet.pptx
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service NashikCollege Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
College Call Girls Nashik Nehal 7001305949 Independent Escort Service Nashik
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
(MEERA) Dapodi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Escorts
 

Finding the number of 0's and 1's in a 32-bit data using an ARM assembly program

  • 1.
  • 2. Embedded system Lab 18ECL66 R L JALAPPA INSTITUTE OF TECHNOLOGY Kodigehalli, Doddaballapur – 561 203 D A Lavanya Vaishnavi Assistant Professor Department of Electronics and communication Engineering
  • 4. ALP to find the number of 0’s and 1’s in a 32 bit data. AREA program,CODE,READONLY ENTRY EXPORT __main __main MOV R0,#0xabcd ; Register Rd MOV R1,#0x1F ; Counter register L1 MOVS R0,R0,LSR #1 ; Logical right shift of number ADDCS R3,R3,#1 ; R3 holds number of ones ADDCC R4,R4,#1 ; R4 holds number of zeros SUB R1,R1,#1 ; decrementing counter value CMP R1,#00 BNE L1 stop END
  • 5. Calculations 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 Total number of 0’s : 𝟏𝟎𝒅 = 𝑨𝒉 Total number of 1’s : 𝟐𝟐𝒅 = 𝟏𝟓𝒉
  • 7.