0% found this document useful (0 votes)
15 views

Microprocessor-Systems-Learning-Module-2-1-24-2-ver-1

The Microprocessor Systems course at President Ramon Magsaysay State University is a four-unit professional course that covers microprocessor architecture, programming, and embedded system design. It aims to equip students with practical skills for designing and debugging microprocessor-based systems, preparing them for careers in electronics and automation. The course includes hands-on experience and assessments through quizzes and projects, with a focus on data representation and number systems.

Uploaded by

Yukihira Soma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Microprocessor-Systems-Learning-Module-2-1-24-2-ver-1

The Microprocessor Systems course at President Ramon Magsaysay State University is a four-unit professional course that covers microprocessor architecture, programming, and embedded system design. It aims to equip students with practical skills for designing and debugging microprocessor-based systems, preparing them for careers in electronics and automation. The course includes hands-on experience and assessments through quizzes and projects, with a focus on data representation and number systems.

Uploaded by

Yukihira Soma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

CpE 323 –

Microprocessor Systems

This is a property of
PRESIDENT RAMON MAGSAYSAY STATE UNIVERSITY
NOT FOR SALE
CpE 323 – Microprocessor Systems
First Edition, 2025

Copyright. Republic Act 8293 Section 176 provides that “No copyright shall subsist in any work of
the Government of the Philippines. However, prior approval of the government agency or office
wherein the work is created shall be necessary for exploitation of such work for profit. Such agency or
office may, among other things, impose as a condition the payment of royalties.

Borrowed materials included in this module are owned by their respective copyright holders. Every
effort has been exerted to reach and seek permission to use these materials from their respective
copyright owners. The University and authors do not claim ownership over them.

Learning Module Development Team

Assigned
Title Author
Chapter
Structural Components of
Chapter 1:
Microprocessor/Microcontroller
Chapter 2: Data Representation and Number Systems
Chapter 3:
Dionisio M. Martin Jr.
Chapter 4:
Chapter 5:
Chapter 6:
Chapter 7:

Evaluators:

Dr. Marlon James Dedicatoria, Program Chair


Engr. Ferndinand Tabligan, Program Chair
Engr. Gilbert Deboma, Dean
Course Overview
Introduction

The Microprocessor Systems course is a four-unit professional course which offers an in-
depth exploration of microprocessors and their application in embedded systems. It provides
students with the foundational knowledge required to understand, program, and interface
microprocessors with various peripherals.

This course provides a comprehensive introduction to microprocessor architecture,


programming, and embedded system design. It combines theoretical learning with practical,
hands-on experience to prepare students for working in the rapidly evolving fields of
electronics, embedded systems, and automation.

By the end of the course, students will gain practical skills in designing, programming, and
debugging microprocessor-based systems used in a wide range of modern technologies such as
robotics, automation, communication devices, and consumer electronics.

Course General Objectives

At the end of the semester, 85% of the students have attained 90% level of understanding for
being aware in the computer engineering, locally and globally.

1. Understand the structure and architecture of microprocessor systems.


2. Learn how to program and interface microprocessors with peripherals.
3. Explore microprocessor components, such as ALU, control unit, registers, memory,
and I/O systems.
4. Develop skills in assembly language programming and higher-level languages for
microprocessor systems.
5. Understand microprocessor communication protocols (e.g., I2C, SPI, UART).
6. Implement real-time systems and control applications using microprocessor-based
systems.

Course Details:

 Course Code: CpE 323


 Course Title: Microprocessor Systems
 No. of Units: 4-unit lecture
 Classification: Lecture with Laboratory-based
 Pre-requisite / Co-Requisite: Logic Circuit and Design
 Semester and Academic Year: 2nd Semester, AY 2024-2025
 Schedule: BSCpE 3A – Tuesday and Thursday, 12:30 PM - 3:30 PM
BSCpE 3B – Tuesday and Thursday, 7:30 AM - 10:30 AM
 Name of Faculty: Dionisio M. Martin Jr.
 Contact Details
Email: [email protected]
Mobile Number: 0939-906-0585
FB Account: Dionisio Martin Jr.
 Consultation
Day: MWF
Time: 1:00-2:00PM

Learning Management System

The University LMS will be used for asynchronous learning and assessment. The link and class
code for LMS will be provided at the start of class through the class’ official Facebook Group.

 Edmodo
 Google Classroom
 University LMS

Assessment with Rubrics

Students will be assessed in a regular basis thru quizzes, assignments, individual/group outputs
using synchronous and/or asynchronous modalities or submission of SLM exercises. Rubrics
are also provided for evaluation of individual/group outputs.

Major examinations will be given as scheduled. The scope and coverage of the examination
will be based on the lessons/topics as plotted in the course syllabus.
0323

Module Overview
Introduction

The Microprocessor Systems course introduces students to the fundamental concepts of


microprocessors and their role in embedded systems. It covers the architecture, operation,
programming, and applications of microprocessors, equipping students with the knowledge
and skills to work with microprocessors in real-world projects.

Microprocessors form the backbone of modern electronics, from simple household devices to
complex industrial control systems. As the demand for embedded systems continues to grow,
understanding how microprocessors work, how they are programmed, and how they interface
with external systems is crucial for engineering students. The Microprocessor Systems course
prepares students for careers in electronics, automation, robotics, and embedded system design
by providing the foundation needed to work with real-time systems and hardware interfaces.

The course emphasizes practical application, enabling students to design, build, and
troubleshoot microprocessor-based systems. It integrates theoretical learning with laboratory
sessions and project work, where students can apply their knowledge to solve real-world
problems.

Table of Contents

Chapter 1: Structural Components of Microprocessor/Microcontroller


Chapter 2: Data Representation and Number Systems
Chapter 3:
Chapter 4:
Chapter 5:
Chapter 6:
Chapter 7:
Microprocessor Systems

Chapter 2

Data Representation and


Number Systems
Chapter 2

Data Representation and Number Systems


Introduction

Data can be anything that provides information numbers, characters, images, audio, video, and
even more complex forms such as software and applications. It can be raw information that is
processed and interpreted to create meaningful output.

In computing, all data must be converted into binary (0s and 1s) for storage and manipulation
because the underlying hardware is built to handle only these binary states.

Data representation in computer organization refers to the way information is encoded within
a computer so that it can be understood and processed by the system. At the core of this process
is the transformation of data into binary digits (bits). The choice of data representation
techniques impacts the efficiency, speed, and accuracy of computing operations.

For example, integers, characters, and floating-point numbers are all represented differently in
a computer system. Data representation not only impacts how data is stored in memory but also
affects how it is manipulated by the processor and how results are output to the user.

Specific Objectives

At the end of the lesson, the students should be able to:


- perform number conversions among various number bases
- define the ASCII, EBCDIC and UNICODE representation for a character set
- explain the fixed and floating point number formats
- perform arithmetic operations using fixed and floating point numbers
- explain error detection and correction codes

Duration

Chapter 2: Data Representation and Number Systems = 2 hours


(1.5-hours discussion;
0.5-hour assessment)

_____________________________________________

DATA REPRESENTATION IN COMPUTERS

Information handled by a computer is classified as instruction and data. No matter whether it is


data in a numeric or non-numeric form or integer, everything is internally represented in Binary.
It is up to the programmer to handle the interpretation of the binary pattern and this interpretation
is called Data Representation. These data representation schemes are all standardized by
international organizations.
Choice of Data representation to be used in a computer is decided by

 The number types to be represented (integer, real, signed, unsigned, etc.)


 Range of values likely to be represented (maximum and minimum to be represented)
 The Precision of the numbers i.e. maximum accuracy of representation (floating point
single precision, double precision etc)
 If non-numeric i.e. character, character representation standard to be chosen. ASCII,
EBCDIC, UTF are examples of character representation standards.
 The hardware support in terms of word width, instruction.

Typical Internal data representation types

Let us take an example of interpretation. Say a byte in Memory has value "0011 0001".
Although there exists a possibility of so many interpretations as in figure 3.2, the program has
only one interpretation as decided by the programmer and declared in the program.

Data Interpretation

CHARACTERS REPRESENTATION

A character can be presented in a computer using a binary code. This code should be
same for different types of computers, else the information from one computer will not be
transferable to other computers. Thus, there is need of a standard for character representation. A
coding standard has to address two basic issues:
a. the length of code
b. organization of different types of characters (printable character set of
different languages and special charact rs)
Standard character sets like EBCDIC and ASCII are chosen to represent alphabets,
numbers and special characters. And Unicode standard is use for non-English language like
Chinese, Hindi, Spanish, etc.

Symbolic Representation Using Coding Schemes


In computing, a single character such as a letter, a number or a symbol is represented by a
group of bits. The number of bits per character depends on the coding scheme used.

1. American Standard Code for Information Interchange (ASCII) – is a 7-bit code,


which means that only 128 characters i.e., 27 can be represented. However, manufactures
have added an eight bit to this coding scheme, which can now provide for 256 characters.
ASCII Table

Note: ASCII codes are in decimal numbers.

– This 8-bit coding scheme is referred to as an 8-bit American standard code for
information interchange. The symbolic representation of letter ‘A’ using this scheme is
010000012 and also equal to 4116 or 6510.

2. Extended Binary Coded Decimal Interchange Code (EBCDIC) – is an 8-bit character-


coding scheme used primarily on IBM computers. A total of 256 (28) characters can be
coded using this scheme. For example, the symbolic representation of letter ‘A’ using
Extended Binary Coded Decimal Interchange code is 110000012 and also equal to 19310
or C116.
EBCDIC Table

Note: EBCDIC codes are in decimal numbers.

ASCII-EBCDIC Conversion Table


0 1 2 3 4 5 6 7 8 9 A B C D E F
0 00 01 02 03 37 2D 2E 2F 16 05 25 0B 0C 0D 0E 0F
1 10 11 12 13 3C 3D 32 26 18 19 3F 27 1C 1D 1E 1F
2 40 4F 7F 7B 5B 6C 50 7D 4D 5D 5C 4E 6B 60 4B 61
3 F0 F1 F2 F3 F4 F5 F6 F7 F8 F9 7A 5E 4C 7E 6E 6F
4 7C C1 C2 C3 C4 C5 C6 C7 C8 C9 D1 D2 D3 D4 D5 D6
5 D7 D8 D9 E2 E3 E4 E5 E6 E7 E8 E9 4A E0 5A 5F 6D
6 79 81 82 83 84 85 86 87 88 89 91 92 93 94 95 96
7 97 98 99 A2 A3 A4 A5 A6 A7 A8 A9 C0 6A D0 A1 07

ASCII as a 7-bit coding schemes, valid hexa values for an ASCII characters are 00
through 7F. The 8 rows in the chart below correspond to the first hexa digit of an ASCII
character (0 to 7). The 16 columns correspond to the second hexa digit of the character (0 to
F). The contents of the cells show the EBCDIC value (hexa) that corresponds to the ASCII
character.

Example 1:
Conversion of ASCII to EBCDIC of the following character: a) A and b) +.
Answer:
ASCII-EBCDIC
ASCII Code Conversion Table
EBCDIC Code
Character
decimal hexa row column hexa decimal
a) A 65 41 4 1 C1 193
b) + 43 2B 2 B 4E 78

Example 2:
Conversion of EBCDIC to ASCII of the following character: a) a and b) 9.
Answer:
ASCII-EBCDIC
ASCII Code Conversion Table
EBCDIC Code
Character
decimal hexa row column hexa decimal
a) a 129 81 6 1 61 97
b) 9 249 F9 3 9 39 57

Example 3:
What is the equivalent decimal, binary and hexadecimal of the message Form #1 in a) ASCII
and b) EBCDIC? All in one line.
Answer:
a) ASCII code
In decimal: 70 111 114 109 32 35 49
In binary: 01000110 01101111 01110010 01101101 00100000 00100011 00110001
In hexadecimal: 46 6F 72 6D 20 23 31
b) EBCDIC code
In decimal: 198 150 153 148 64 123 241
In binary: 11000110 10010110 10011001 10010100 01000000 01111011 11110001
In hexadecimal: C6 96 99 94 40 7B F1

Example 4:
Decode this message (binary form) using 7-bit ASCII code:
1001000 1000101 1001100 1001100 1001111 0100000 1000110 1001111 1010010
1001101
Answer:
In decimal: 72 69 76 76 79 32 70 79 82 77
Message: HELLO FORM

3. Unicode – is a standardized character encoding system that aims to represent text in


virtually all of the world's writing systems. It was developed to address the limitations of
earlier character encoding schemes, which could only represent a limited number of
characters and often varied between different systems.
– includes characters from almost all modern writing systems, as well as many
historical scripts, mathematical symbols, and emoji. It is designed to support diverse
languages and symbols.
– has the following features:
1. Character Set: The Unicode standard includes over 143,000 characters (as of
Unicode 15), covering alphabets, ideograms, punctuation marks, and even
technical symbols. Each character is assigned a unique code point, usually
represented in hexadecimal (e.g., U+0041 for the Latin letter "A").
2. Code Points: A code point is a unique identifier for each character in the
Unicode standard. For example, the code point for the letter "A" is U+0041.
These code points are independent of how the characters are stored in
memory.
– can be represented in several encoding forms:
a. UTF-8: A variable-length encoding, most commonly used for web pages and
file storage. It uses 1 to 4 bytes for each character and is backward-
compatible with ASCII.
b. UTF-16: Another variable-length encoding, typically used in Java and
Windows environments. It uses 2 or 4 bytes to represent characters.
c. UTF-32: A fixed-length encoding that uses 4 bytes for each character,
allowing for simple indexing but at the cost of higher memory usage.
– is backward-compatible with ASCII, which is a subset of Unicode. The first 128
Unicode code points correspond directly to ASCII characters (from U+0000 to U+007F),
ensuring that existing ASCII-based systems can easily transition to Unicode.
– divides characters into categories, such as letters, digits, punctuation, and symbols.
This categorization allows for easier processing of text and enables functions like case
conversion, digit classification, and sorting.
– supports combining characters, which means that certain characters can be
represented as a base character plus one or more combining marks. For example, the letter
"é" can be represented as the letter "e" followed by a combining acute accent.
– includes a wide variety of emoji and other symbols that are widely used in digital
communication.
– has become the foundation for modern computing, ensuring that text is represented
consistently across different systems and platforms. It supports multilingual text
processing and is essential for global communication and data exchange.

_____________________________________________

References/Additional Resources/Readings

https://witscad.com/course/computer-architecture/chapter/data-representation
Activity Sheet
ACTIVITY 2.1

Name: ___________________________ Course/Year/Section: ___________ Score: _________

Direction: Encircle the letter of the best answer.


1. Which of the following statements about data representation is TRUE?
a) All data in a computer is stored as hexadecimal values.
b) ASCII is a 16-bit character encoding scheme.
c) The choice of data representation affects memory usage and processing speed.
d) Unicode can only represent English characters.
2. In a 7-bit ASCII encoding system, how many different characters can be represented?
a) 64 b) 128 c) 256 d) 512
3. What is the binary representation of the decimal number 156?
a) 10011011 b) 10011100 c) 10010110 d) 10011110
4. Which number system is primarily used by modern digital computers?
a) Decimal b) Binary c) Octal d) Hexadecimal
5. Which of the following is NOT an advantage of Unicode over ASCII?
a) It supports multiple languages and symbols.
b) It allows backward compatibility with ASCII.
c) It is always more memory-efficient than ASCII.
d) It provides a standardized representation for all characters.
6. What is the hexadecimal equivalent of the binary number 10111010?
a) BA b) B8 c) 5A d) 3E
7. What is the primary difference between ASCII and EBCDIC?
a) ASCII uses 7 or 8 bits, while EBCDIC uses 8 bits.
b) EBCDIC is used primarily on Windows-based systems.
c) ASCII can only represent numeric values.
d) EBCDIC is an extension of Unicode.
8. What is the main advantage of using floating-point representation for numbers?
a) It uses fewer bits than fixed-point representation.
b) It allows representation of very large and very small numbers.
c) It is faster to process than integer arithmetic.
d) It eliminates the need for rounding errors.
9. What is the Unicode code point for the letter "A"?
a) 0x0041 b) 0x0042 c) 0x0020 d) 0x0100
10. In the context of data representation, what does UTF-8 stand for?
a) Universal Text Framework - 8-bit b) Unicode Transformation Format - 8-bit
c) Universal Translation Format - 8-bit d) Unicode Text Function - 8-bit
11. Which of the following statements about fixed-point and floating-point representation is TRUE?
a) Fixed-point numbers can represent a larger range of values than floating-point numbers.
b) Floating-point numbers require more memory but provide higher precision for very
large or small values.
c) Floating-point representation is only used in integer arithmetic.
d) Fixed-point representation is always more accurate than floating-point representation.
12. How many bits are used to store a standard Unicode character in UTF-32 encoding?
a) 8 bits b) 16 bits c) 32 bits d) Variable length
13. What is the primary reason for using two's complement representation for signed integers?
a) It simplifies arithmetic operations such as addition and subtraction.
b) It allows encoding of larger positive integers than unsigned representation.
c) It provides a more human-readable format for negative numbers.
d) It eliminates the need for a sign bit.
14. What is the octal equivalent of the binary number 110101110?
a) 526 b) 334 c) 746 d) 432
15. Which of the following number representations is most suitable for error detection and correction
in data transmission?
a) ASCII b) Two’s complement c) Hamming Code d) IEEE 754
16. What is the binary representation of the hexadecimal number 3F9?
a) 111111001 b) 1111110001 c) 111110011 d) 1111111001
17. If the ASCII code for uppercase ‘C’ is 67, what is the ASCII code for lowercase ‘c’?
a) 67 b) 99 c) 97 d) 103
18. Which of the following number systems is not positional?
a) Binary b) Octal c) Roman Numerals d) Decimal
19. Which encoding scheme is backward-compatible with ASCII and commonly used for web
applications?
a) UTF-8 b) EBCDIC c) UTF-16 d) UTF-32
20. In IEEE 754 floating-point representation, how is the exponent stored?
a) As a two’s complement number b) In excess (biased) notation
c) As an unsigned binary integer d) In gray code format

Direction: Match the items in column A with their correct equivalents in column B. Write only the
letter of your choice on the space provided.
A B
_____ 1. ASCII code for ‘G’ a. 20 (Hexa)
_____ 2. EBCDIC code for ‘A’ b. E9 (Hexa)
_____ 3. ASCII representation of ‘5’ c. 4D (Hexa)
_____ 4. EBCDIC equivalent of ASCII ‘Z’ d. 80 (Decimal)
_____ 5. Binary representation of ASCII ‘K’ e. C1 (Hexa)
_____ 6. ASCII to EBCDIC equivalent of ‘9’ f. 71 (Decimal)
_____ 7. Decimal equivalent of ASCII ‘#’ g. 35 (Decimal)
_____ 8. Hexadecimal equivalent of ASCII ‘M’ h. 1001011 (Binary)
_____ 9. ASCII code for space (‘ ’) i. 35 (Hexa)
_____ 10. EBCDIC equivalent of ASCII ‘&’ j. F9 (Hexa)

Direction: Complete the following table.


ASCII code EBCDIC code
Character
decimal binary hexa decimal binary hexa
1. #
2. 78
3. 01001111
4. 4B
5. 11110001
Conversions: Convert the following to ASCII-EBCDIC or EBCDIC-ASCII.

1. Convert the ASCII string "CODE" into its EBCDIC hexa equivalent.
2. The following EBCDIC sequence is given: D5 C9 C3 C5. Convert it to ASCII characters.
3. Convert the ASCII number "12345" into EBCDIC hexa format.
4. Convert the EBCDIC sequence 4E 5B 6B 7E into ASCII characters.
5. Convert the ASCII phrase "A1B2C3" into EBCDIC characters.

Direction: Give the complete terms for the following abbreviated words.
1. ASCII
2. EBCDIC
3. UTF
4. BCD
5. IEEE
6. ISO
7. RAM
8. ROM
9. BPS
10. KB

You might also like