Course Profile   Computer Engineering (ICE4M), Grade 12, University/College Preparation, Combined

 

Unit 4:  Computer Programming

Time:  20 hours

 

Activity 4.1 | Activity 4.2 | Activity 4.3 | Activity 4.4 | Activity 4.5

 

Unit Description

Students are introduced to low-level programming by making comparisons with the more familiar high-level programming. Concepts students need to understand in order to compare, trace, and write low-level programs include registers, addressing techniques, flags, repetition, and decision structures. Since low-level programming contains no recognisable English words, reflective thinking and creative problem solving are extremely important. In this unit, students develop problem-solving and critical-thinking skills with the view of applying these skills to global issues in the Catholic tradition.

Unit Synopsis Chart

Activity

Time

Learning Expectations

Assessment Categories

Tasks

4.1
Performing Arithmetic Operations in Different Bases

3 hours

TF1.01, SP1.01

CGE2b, 3b, 3c

Application

Communication

Base conversions among decimal, binary, and hexadecimal number systems and binary arithmetic

4.2
High- and Low-Level Constructs

3 hours

TFV.04, TF3.01, TF3.03, ICV.03

CGE2e, 3c

Thinking/Inquiry

Communication

Constructs include assigning values to variables and incrementing numbers

4.3
Addressing Techniques

2 hours

TF3.01, TF3.02

CGE3c, 7e

Knowledge/ Understanding

Thinking/Inquiry

Techniques include immediate, direct, and indirect addressing

4.4
Tracing Low-Level Programs

5 hours

TF3.01, SP3.02

CGE2b, 3c

Application

Thinking/Inquiry

Tracing includes assignment statements, decision structures, and looping structures

4.5
Writing Low-Level Programs

7 hours

TF3.01, TF3.02, SP3.03, IC1.05

CGE2c, 4g, 7j

Communication

Knowledge/ Understanding

Application

Low-level programs include the addressing and low-level constructs traced in
Activities 4.2 to 4.4

 

Activity 4.1:  Performing Arithmetic Operations in Different Bases

Time:  3 hours

Description

To understand the low-level programming structures and techniques introduced in this unit, students study some of the relationships among the decimal-based number system and the binary and hexadecimal number systems. Students also study arithmetic operations in the binary number system that are developed and applied to low-level programming and to signed and unsigned numbers. Students add to their journals by listing ways that computer software technology can be used for the common good.

Strand(s) & Learning Expectations

Ontario Catholic School Graduate Expectations

CGE2b - read, understand, and use written materials effectively;

CGE3b - create, adapt, and evaluate new ideas in light of the common good;

CGE 3c - think reflectively and creatively to evaluate situations and solve problems.

Strand(s):  Theory and Foundation, Skills and Processes

Specific Expectations

TF1.01 - describe how signed and unsigned numbers are represented;

SP1.01 - convert between decimal and binary numbers;

ICV.01 - identify issues related to the ethical use of computers;

ICV.03 - describe the use of computer technologies and their impact in the community;

Prior Knowledge & Skills

·         Arithmetic operations, including place value in base 10.

Planning Notes

·         Review arithmetic operations in binary with the goal of applying these operations to low-level programming in future activities.

Teaching/Learning Strategies

1.   The teacher initiates class discussion about the possible uses of computer software for helping solve global and community problems. Students write in their journals about how computers can solve some global and community problems. Ideas are used to develop a Code of Ethics in Activity 5.

2.   The teacher then initiates discussion about the need for other number systems besides base 10.

3.   The teacher demonstrates other numbering systems.

4.   Students develop a table to count in binary and hexadecimal number systems and add the table to their portfolios.

5.   Students compare these systems with the base-10 number system and establish relationships.

6.   The teacher reviews the conversion mechanisms between base 10, the decimal system, and base 2, the binary system.

7.   The teacher reviews the arithmetic operations of addition and subtraction in binary and introduces the two’s-complement method of subtracting.

8.   Students discuss the advantages and disadvantages of two subtraction methods.

9.   Students pair up to establish the two’s-complement method’s connection to signed and unsigned numbers.

Assessment & Evaluation of Student Achievement

·         Score student answers on conversion table chart that relates binary and decimal number systems (Appendix 4.1.1 – Binary and Decimal Number System Conversions).

·         Students are assessed on their completed conversion charts (Appendix 4.1.2 – Binary and Hexadecimal Number Conversions).

·         Students complete the arithmetic operation question sheet (Appendix 4.1.3 – Adding and Subtracting in Binary).

·         Students are assessed on their ability to apply arithmetic operations to signed and unsigned numbers (Appendix 4.1.4 – Signed and Unsigned Numbers).

Accommodations

·         Provide a partially completed glossary that students complete on their own or with assistance from their peers.

·         Appoint a safety monitor or use the buddy system.

Resources

Print

Brey, Barry B. Intel Microprocessors: Architecture, Programming and Interfacing. Prentice Hall, 2000.
ISBN 0-13-995408-2

Gaonkar, Ramesh S. Microprocessor Architecture, Programming, and Applications with the 8085. Toronto: Collier Macmillan Canada Inc., 1999. ISBN 0-13-901257-5

Haskell, Richard E. Introduction to Computer Engineering: Logic Design and the 8086 Microprocessor. Prentice Hall, 1993. ISBN 0-13-489436-7

Smyth, Graham and Christine Stephenson. Computer Engineering: An Activity-Based Approach. Toronto: Holt Software Associates, 2000. ISBN 0-921598-36-X

Websites

Microprocessor Simulator 8085 Ver3.2 – http://www.insoluz.com


Appendix 4.1.1

Binary and Decimal Number System Conversions

Most mathematical, scientific, and high-level programming is carried out in the base 10 (decimal) number system. Computers, however, do not use the decimal system but rather the binary number system. In order to understand how a computer really processes numbers, binary-decimal conversions must be understood.

 

Example 1: Convert the binary number 10011000 to base 10. Check your answer using a calculator.

Since binary numbers have place value, like the decimal number system, the fundamental operation is multiplication where each successive binary digit is multiplied by 2. Writing the number 10011000 vertically and multiplying by the appropriate binary place value gives the following numbers.

1 X 27 = 128

0 X 26 =    0

0 X 25 =    0

1 X 24 =  16

1 X 23 =    8

0 X 22 =    0

0 X 21 =    0

0 X 20 =   0

Total =   152

Therefore 100110002 = 15210

 

Example 2: Convert the decimal number 56 to binary. Check your answer using a calculator.

The fundamental arithmetic operation in example 1 (conversion was from binary to base 10) was multiplication. Here the fundamental operation is division since the conversion is in the opposite direction.

Divisions:

Remainders:

0

0

0

1

1

1

The division stops since the last quotient was 0. The binary answer is found in the remainders collected in reverse. Therefore, 5610 = 1110002.

 

Complete the following chart. Check your answers using a calculator. Add this work to your portfolio.

Question

Decimal Number

Binary Number

1

255

 

2

 

1100110

3

73

 

4

 

111011

5

5678

 

 


Appendix 4.1.2

Binary and Hexadecimal Number Conversions

 

The conversion between binary and hexadecimal is the easiest conversion. Writing binary numbers and hexadecimal numbers out in a chart, you will recognize that the 4-bit binary number 1111 coincides with the hexadecimal digit F.

Conversion Chart

Decimal

Binary

Hexadecimal

 

Decimal

Binary

Hexadecimal

0

0000

0

 

8

1000

8

1

0001

1

 

9

1001

9

2

0010

2

 

10

1010

A

3

0011

3

 

11

1011

B

4

0100

4

 

12

1100

C

5

0101

5

 

13

1101

D

6

0110

6

 

14