Skip to content

nesterrovv/cs-basics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basics of computer science

Short description:

My implimentation of CS basics course at the ITMO University, 1st year of stydнing. The course is supposed to be introductory to the specialty, in the documents it sounds like "Fundamentals of professional activity". In practice, it implies familiarity with computers at a low level: the processor device and its registers, the organization of calculations and work with memory, the clock-by-cycle execution of commands similar to assembly codes, and so on. As part of the course, several laboratory works are expected to be performed, reports on which will be published here. It is also planned to publish sources that help to master the subject, as well as my notes on the course.

Laboratory work #2. Study of the work of the computer.

Purpose:

The purpose of the work is to study the methods of work on the base computer and the study order of execution of arithmetic instructions and transfer instructions.

Task:

According to the variant given by the teacher, determine the function, calculated by the program, the representation area and the range of valid values source data and result, trace the program, suggest variant with fewer commands. Present the results while doing the work. and all operands of arithmetic operations are signed numbers, and logical operations by a set of sixteen logical values.

Preparing for work:

Get to know the device and system commands of the base computer (see Appendix B, paragraphs 1.1 - 1.6), the order of execution machine commands (clause 1.9), instructions for working with the base computer model (see appendix D). To study the representations in the computer of numerical and logical values.

Work order:

Restore the text of the given variant program, separate data cells from program code, write assignment program and the implemented function, which is represented as a formula.

During admission to work, obtain from the teacher the initial data for variables, agree on a version of the program for execution, memorize base computer a given version of the program and, executing it by command, fill trace table of the executed program. Entering the program with data, and also demonstrate the launch of the program in remote mode to the teacher.

Laboratory work #3. Execution of cyclic programs.

Purpose:

The purpose of the work is to study ways to organize cyclic programs and study of the order of operation of the computer when performing cyclic programs and processing of one-dimensional arrays

Task:

According to the variant given by the teacher, restore the text a given version of the program, determine the purpose and write a description program, determine the scope of the presentation and the range of valid values source data and result, trace the program.

Preparing for work:

Obtain the variant number and initial data from the teacher laboratory work. To study the ways and means of organizing cyclic programs using the command system of the base computer (Appendix B, clause 1.7). Restore the text of the specified version of the program. Write a description of the program.

Work order:

Obtain the variant number and initial data from the teacher laboratory work. To study the ways and means of organizing cyclic programs using the command system of the base computer (Appendix B, clause 1.7). Restore the text of the specified version of the program. Write a description of the program.

Laboratory work #4. Execution of program complex.

Purpose:

to study the ways of communication between software modules, commands for calling a subroutine and examining the order of operation basic computer when executing a complex of interconnected programs.

Task:

According to the version issued by the teacher, restore the text a given version of the program and subprogram (software complex), determine their purpose and write a description, define the area representations and range of valid values for the original data and subroutine return values, trace the program complex.

Preparing for work:

Obtain the variant number and initial data from the teacher laboratory work. Learn how to communicate between software modules and instructions for accessing a subroutine in the base computer (Appendix B, clause 1.8). Restore the text of a given version of the software package, compose it description, draw a graph of the function that is evaluated in the subroutine.

Work order:

Obtain access to laboratory work, presenting the prepared materials to the teacher. Save to base memory computer a given version of the software package and fill in the tracing table, performing this complex on commands. Sign the trace table!

Laboratory work #5. Asynchronous data exchange with ED.

Purpose:

The study of the organization of the input-output system of the base computer, input-output commands and the study of the process of functioning of a computer during the exchange data on readiness signals of external devices (ED).

Task:

According to the version given by the teacher, develop a program for asynchronous data exchange with an external device. Using the program, enter or output information, using as confirmation data signal (button) of ED readiness.

Preparing for work:

To study the organization of the input-output system and the input-output commands of the base computer, the organization of asynchronous program-controlled data exchange (Appendix B, items 2.1-2.3, Table B.14). Develop a given program and write its description. Program commands, used variables and character codes must be placed in the specified cells. Encode the string in the specified encoding, as well as in UTF-8 and UTF-16 encodings.

Work order:

  1. Obtain access to laboratory work by presenting to the teacher prepared materials.
  2. Develop and enter a program into the computer, enter data if necessary.
  3. Show the teacher a given working program that performs in automatic mode input-output characters. ten
  4. In the mode of command-by-command execution of the program, enter (output) the first two characters of the given word, filling the trace table.
  5. Switch the computer to automatic program execution mode and enter (display) the remaining characters of the given word. Trace table sign with the teacher!
  6. Optionally, according to the additional task of the teacher, redo input-output device (ED-1...ED-3) on ED-4...ED-10.