SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
Lab 1: 20 points
EE 337: Microprocessors Laboratory (Spring 2021)
Section: S2 (Third year UG)
Indian Institute of Technology Bombay
Date: January 14, 2021
1. [5 points] Write an assembly language program that adds two 8-bit numbers in mem-
ory locations 70H and 71H and writes the result to memory location 72H. The carry
should be at memory location 73H, i.e., the byte at this memory location should
contain 01H in case carry occurs during the addition. Otherwise, it should contain
00H.
2. [15 points] A (7, 4) Hamming code encoder converts a 4-bit message into a 7-bit
codeword. The extra 3 bits help in correcting a single error in any of the 7 codeword
bits. A error here refers to the flipping of a bit from 1 to 0 or 0 to 1. If the message bits
are denoted by b0, b1, b2, b3, the three parity bits b4, b5, b6 are given by the following
equations where ⊕ denotes XOR operation.
b4 = b0 ⊕ b2 ⊕ b3
b5 = b0 ⊕ b1 ⊕ b3
b6 = b1 ⊕ b2 ⊕ b3
The codeword is given by the 7-bit vector b6 b5 b4 b3 b2 b1 b0 .
Write an assembly language to generate 4 Hamming codewords by encoding the 16
bits in memory locations 70H and 71H. The 16 bits have to encoded 4 bits at a time.
The codewords should be stored in memory locations 72H to 75H. Each codeword
occupies the least significant 7 bits of the byte at each memory location. The bit b0
occupies the least significant bit in the byte, bit b1 occupies the next significant bit
and so on.
TA Checkpoints
1. Check that the student knows how to create a new project in Keil µVision with the
right settings for the Pt-51 board.
2. Check that the student knows how to add an assembly language program to the
project.
3. Check that the student knows how to compile the assembly program.
4. Check that the student knows how to step through the program in debug mode.
5. Check that the student knows how to examine the contents of registers.
6. Check that the student knows how to examine the contents of memory at a partic-
ular location.
7. For question 1, ask the student to load some bytes into memory locations 70H and
71H and show you the result of running the program.
8. For question 2, ask the student to load some bytes into memory locations 70H and
71H and show you the result of running the program.

Weitere ähnliche Inhalte

Was ist angesagt?

Operating system lab task
Operating system lab taskOperating system lab task
Operating system lab task
hammad1515
 
Embedded c programming22 for fdp
Embedded c programming22 for fdpEmbedded c programming22 for fdp
Embedded c programming22 for fdp
Pradeep Kumar TS
 

Was ist angesagt? (20)

C programming first_session
C programming first_sessionC programming first_session
C programming first_session
 
Intro to cprogramming
Intro to cprogrammingIntro to cprogramming
Intro to cprogramming
 
C programming language
C programming languageC programming language
C programming language
 
A Crash Course in C Part-1
A Crash Course in C Part-1A Crash Course in C Part-1
A Crash Course in C Part-1
 
C Programming Language Step by Step Part 1
C Programming Language Step by Step Part 1C Programming Language Step by Step Part 1
C Programming Language Step by Step Part 1
 
C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17C Programming Lab manual 18CPL17
C Programming Lab manual 18CPL17
 
Operating system lab task
Operating system lab taskOperating system lab task
Operating system lab task
 
Std 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQsStd 10 Chapter 10 Introduction to C Language Important MCQs
Std 10 Chapter 10 Introduction to C Language Important MCQs
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming language
 
C language introduction
C language introduction C language introduction
C language introduction
 
Why C is Called Structured Programming Language
Why C is Called Structured Programming LanguageWhy C is Called Structured Programming Language
Why C is Called Structured Programming Language
 
C language
C languageC language
C language
 
Embedded c programming22 for fdp
Embedded c programming22 for fdpEmbedded c programming22 for fdp
Embedded c programming22 for fdp
 
Embedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontrollerEmbedded C programming based on 8051 microcontroller
Embedded C programming based on 8051 microcontroller
 
Chap 11-1
Chap 11-1Chap 11-1
Chap 11-1
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
 
Ocs752 unit 1
Ocs752   unit 1Ocs752   unit 1
Ocs752 unit 1
 
Ocs752 unit 3
Ocs752   unit 3Ocs752   unit 3
Ocs752 unit 3
 
How c/c++ works
How c/c++ worksHow c/c++ works
How c/c++ works
 
175035 cse lab 01
175035 cse lab 01175035 cse lab 01
175035 cse lab 01
 

Ähnlich wie EE 337 Lab 1 for Section 2 (3rd year UG)

Ähnlich wie EE 337 Lab 1 for Section 2 (3rd year UG) (20)

MIC PROJECT.pdf
MIC PROJECT.pdfMIC PROJECT.pdf
MIC PROJECT.pdf
 
GSP 215 Enhance teaching/tutorialrank.com
 GSP 215 Enhance teaching/tutorialrank.com GSP 215 Enhance teaching/tutorialrank.com
GSP 215 Enhance teaching/tutorialrank.com
 
GSP 215 Inspiring Innovation/tutorialrank.com
GSP 215 Inspiring Innovation/tutorialrank.comGSP 215 Inspiring Innovation/tutorialrank.com
GSP 215 Inspiring Innovation/tutorialrank.com
 
C Interview Basic Q&A- 1
C Interview Basic Q&A- 1C Interview Basic Q&A- 1
C Interview Basic Q&A- 1
 
Gsp 215 Believe Possibilities / snaptutorial.com
Gsp 215  Believe Possibilities / snaptutorial.comGsp 215  Believe Possibilities / snaptutorial.com
Gsp 215 Believe Possibilities / snaptutorial.com
 
GSP 215 Entire Course NEW
GSP 215 Entire Course NEWGSP 215 Entire Course NEW
GSP 215 Entire Course NEW
 
GSP 215 RANK Education Counseling -- gsp215rank.com
GSP 215 RANK Education Counseling -- gsp215rank.comGSP 215 RANK Education Counseling -- gsp215rank.com
GSP 215 RANK Education Counseling -- gsp215rank.com
 
GSP 215 RANK Introduction Education--gsp215rank.com
GSP 215 RANK Introduction Education--gsp215rank.comGSP 215 RANK Introduction Education--gsp215rank.com
GSP 215 RANK Introduction Education--gsp215rank.com
 
GSP 215 RANK Education Counseling--gsp215rank.com
 GSP 215 RANK Education Counseling--gsp215rank.com GSP 215 RANK Education Counseling--gsp215rank.com
GSP 215 RANK Education Counseling--gsp215rank.com
 
GSP 215 RANK Education Planning--gsp215rank.com
GSP 215 RANK Education Planning--gsp215rank.comGSP 215 RANK Education Planning--gsp215rank.com
GSP 215 RANK Education Planning--gsp215rank.com
 
Gsp 215 Enhance teaching-snaptutorial.com
Gsp 215 Enhance teaching-snaptutorial.comGsp 215 Enhance teaching-snaptutorial.com
Gsp 215 Enhance teaching-snaptutorial.com
 
GSP 215 Effective Communication - tutorialrank.com
GSP 215  Effective Communication - tutorialrank.comGSP 215  Effective Communication - tutorialrank.com
GSP 215 Effective Communication - tutorialrank.com
 
GSP 215 Education Organization - snaptutorial.com
GSP 215  Education Organization - snaptutorial.comGSP 215  Education Organization - snaptutorial.com
GSP 215 Education Organization - snaptutorial.com
 
GSP 215 RANK Education Your Life--gsp215rank.com
GSP 215 RANK Education Your Life--gsp215rank.comGSP 215 RANK Education Your Life--gsp215rank.com
GSP 215 RANK Education Your Life--gsp215rank.com
 
GSP 215 RANK Lessons in Excellence-- gsp215rank.com
GSP 215 RANK Lessons in Excellence-- gsp215rank.comGSP 215 RANK Lessons in Excellence-- gsp215rank.com
GSP 215 RANK Lessons in Excellence-- gsp215rank.com
 
GSP 215 RANK Inspiring Innovation--gsp215rank.com
GSP 215 RANK Inspiring Innovation--gsp215rank.com GSP 215 RANK Inspiring Innovation--gsp215rank.com
GSP 215 RANK Inspiring Innovation--gsp215rank.com
 
GSP 215 Technology levels--snaptutorial.com
GSP 215 Technology levels--snaptutorial.comGSP 215 Technology levels--snaptutorial.com
GSP 215 Technology levels--snaptutorial.com
 
Gsp 215 Massive Success / snaptutorial.com
Gsp 215  Massive Success / snaptutorial.comGsp 215  Massive Success / snaptutorial.com
Gsp 215 Massive Success / snaptutorial.com
 
Gsp 215 Enthusiastic Study / snaptutorial.com
Gsp 215 Enthusiastic Study / snaptutorial.comGsp 215 Enthusiastic Study / snaptutorial.com
Gsp 215 Enthusiastic Study / snaptutorial.com
 
Gsp 215 Effective Communication / snaptutorial.com
Gsp 215  Effective Communication / snaptutorial.comGsp 215  Effective Communication / snaptutorial.com
Gsp 215 Effective Communication / snaptutorial.com
 

Mehr von SaravananVijayakumar4

Mehr von SaravananVijayakumar4 (18)

EE337 Microprocessors Lab Labsheet 5
EE337 Microprocessors Lab Labsheet 5EE337 Microprocessors Lab Labsheet 5
EE337 Microprocessors Lab Labsheet 5
 
EE337 Spring 2023 Lab1
EE337 Spring 2023 Lab1EE337 Spring 2023 Lab1
EE337 Spring 2023 Lab1
 
EE337 Microprocessor Lab, Course Outline, Spring 2023
EE337 Microprocessor Lab, Course Outline, Spring 2023EE337 Microprocessor Lab, Course Outline, Spring 2023
EE337 Microprocessor Lab, Course Outline, Spring 2023
 
EE337 Course introduction 2021
EE337 Course introduction 2021EE337 Course introduction 2021
EE337 Course introduction 2021
 
Pt 51 ver-1.3_user_manual
Pt 51 ver-1.3_user_manualPt 51 ver-1.3_user_manual
Pt 51 ver-1.3_user_manual
 
Intel Hex Format
Intel Hex FormatIntel Hex Format
Intel Hex Format
 
Getting started with Keil uVision 2020
Getting started with Keil uVision 2020Getting started with Keil uVision 2020
Getting started with Keil uVision 2020
 
EE337 Course introduction 2021
EE337 Course introduction 2021EE337 Course introduction 2021
EE337 Course introduction 2021
 
Hex file creation using Keil uVision
Hex file creation using Keil uVisionHex file creation using Keil uVision
Hex file creation using Keil uVision
 
Debugging programs with Keil uVision
Debugging programs with Keil uVisionDebugging programs with Keil uVision
Debugging programs with Keil uVision
 
Serial IO for 8051
Serial IO for 8051Serial IO for 8051
Serial IO for 8051
 
8051 Timers
8051 Timers8051 Timers
8051 Timers
 
8051 Interrupts
8051 Interrupts8051 Interrupts
8051 Interrupts
 
Introduction to Microcontrollers
Introduction to MicrocontrollersIntroduction to Microcontrollers
Introduction to Microcontrollers
 
8051 instruction set
8051 instruction set8051 instruction set
8051 instruction set
 
89c5131datasheet
89c5131datasheet89c5131datasheet
89c5131datasheet
 
Pt-51 User Manual
Pt-51 User ManualPt-51 User Manual
Pt-51 User Manual
 
EE337 Course introduction 2018
EE337 Course introduction 2018EE337 Course introduction 2018
EE337 Course introduction 2018
 

Kürzlich hochgeladen

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
 
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
KarakKing
 

Kürzlich hochgeladen (20)

Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
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
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
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
 
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Ữ Â...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
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
 
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
 
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
 
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
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
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
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

EE 337 Lab 1 for Section 2 (3rd year UG)

  • 1. Lab 1: 20 points EE 337: Microprocessors Laboratory (Spring 2021) Section: S2 (Third year UG) Indian Institute of Technology Bombay Date: January 14, 2021 1. [5 points] Write an assembly language program that adds two 8-bit numbers in mem- ory locations 70H and 71H and writes the result to memory location 72H. The carry should be at memory location 73H, i.e., the byte at this memory location should contain 01H in case carry occurs during the addition. Otherwise, it should contain 00H. 2. [15 points] A (7, 4) Hamming code encoder converts a 4-bit message into a 7-bit codeword. The extra 3 bits help in correcting a single error in any of the 7 codeword bits. A error here refers to the flipping of a bit from 1 to 0 or 0 to 1. If the message bits are denoted by b0, b1, b2, b3, the three parity bits b4, b5, b6 are given by the following equations where ⊕ denotes XOR operation. b4 = b0 ⊕ b2 ⊕ b3 b5 = b0 ⊕ b1 ⊕ b3 b6 = b1 ⊕ b2 ⊕ b3 The codeword is given by the 7-bit vector b6 b5 b4 b3 b2 b1 b0 . Write an assembly language to generate 4 Hamming codewords by encoding the 16 bits in memory locations 70H and 71H. The 16 bits have to encoded 4 bits at a time. The codewords should be stored in memory locations 72H to 75H. Each codeword occupies the least significant 7 bits of the byte at each memory location. The bit b0 occupies the least significant bit in the byte, bit b1 occupies the next significant bit and so on. TA Checkpoints 1. Check that the student knows how to create a new project in Keil µVision with the right settings for the Pt-51 board. 2. Check that the student knows how to add an assembly language program to the project. 3. Check that the student knows how to compile the assembly program. 4. Check that the student knows how to step through the program in debug mode. 5. Check that the student knows how to examine the contents of registers. 6. Check that the student knows how to examine the contents of memory at a partic- ular location. 7. For question 1, ask the student to load some bytes into memory locations 70H and 71H and show you the result of running the program. 8. For question 2, ask the student to load some bytes into memory locations 70H and 71H and show you the result of running the program.