**Course title, code:** Computer Architectures 1, GAINBAN-SZAMARC1-1

**Name and type of the study programme:**

**Curriculum:**2021

**Number of classes per week (lectures+seminars+labs):**2+0+2

**Credits:**5

**Theory:**50 %

**Practice:**50 %

**Recommended semester:**2

**Study mode:**full-time

**Prerequisites:**Digital Electronics 1

**Evaluation type:**exam

**Course category:**compulsory

**Language:**english

**Responsible instructor:**Dr. Pintér István

**Responsible department:**Department of Information Technologies

**Instructor(s):**Koszna Ferenc , Koszna Ferenc

**Course objectives:**

The aim of the course is to familiarise students with the operation of computers and peripherals, the main interfaces, with particular emphasis on machine instruction execution and machine data types.

**Course content - lectures:**

1. Number systems, conversions (2,8,10,16; whole parts and fractions). Representation of unsigned integers (2,16). Number range for 8, 16, 32, 64 and N bits. MSB, LSB. 2. Representation of signed integers in two's complement code (2, 16). Range of numbers for 8, 16, 32, 64 and N bits. Sign expansion, determining (-1) times of a number, related instructions. 3. Floating point number notation (IEEE-754). The normalized form. Binary representation of the sign ("natural") exponent. Implicit and explicit bit representation. Structure of a number in the 32-bit case. 4. Floating point register/stack organization, operation, RPN formula. Useful floating point constants. 5. BCD number representation (packed, unpacked, tetrad, pseudo-tetrad, half-byte carry). Support for BCD arithmetic at ISA level. Two's complement code addition/subtraction for multi-bit operands. Carry bit, sign bit, overflow bit, zero sign, borrow bit. 6. Main parts of the Neumann machine, their functions. Program area, data area. Stack area. B/K handling. Concept of self modifying code. The Harvard machine. Machine instruction execution flow on the Neumann machine. ILP and pipeline, hazards (WAW, WAR, RAW, RAR) and their handling. Unconditional branching, conditional branching after comparison instruction, conditional branching by state bits, conditional and unconditional procedure call and return, role of stack. 7. Static and dynamic branch prediction, implementation with finite state machine. Vector interrupt system and its operation. Maskable and non-maskable interrupt, software interrupt, interrupt instructions. Interrupt and exception. Structure of machine instructions (four address, three address, two address, 1.5 address, one address, zero address). 8. RISC and CISC. Four address machine and microprogrammed controller. Number of logic functions with N variables. Functionally complete system. Boolean algebra. Algebraic simplification of logic functions. Writing the algebraic form of a logic function given by a truth table, implementation. Logical statements. 9. SRAM and DRAM organization and addressing. Parity protected main memory. Error correction code protected main memory (SECDED ECC). Possibilities of bus design, comparison (TP, OC, TS). Data transfer in synchronous and asynchronous bus, examples. The concept of bus arbitration (decentralised, centralised, priorities). 10. Main parts of the 1-bit ALU (decoder, logic executor, aggregator, inputs, outputs) and schematic circuit diagram. Memory hierarchy (capacity, access time). Principles of cache operation, calculation of average access time, cache organisation methods, operation in read/write. Digital comparator schematic example, caching application. 11. Data storage on moving magnetic media (read/write, organisation, application). Increasing reliability (RAID). HDD and SSD. 12. Possibilities and limitations of increasing computing power. MIPS and FLOPS. Possibilities and limitations to reduce electrical power consumption. 13. From high-level language to HW implementation of machine instructions with examples (levels, languages, virtual machines, interpreter, compiler).

**Course content - labs:**

1. Number systems, conversions (2,8,10,16; whole parts and fractions). Representation of unsigned integers (2,16). Number range for 8, 16, 32, 64 and N bits. MSB, LSB. 2. Representation of signed integers in two's complement code (2, 16). Range of numbers for 8, 16, 32, 64 and N bits. Sign expansion, determining (-1) times of a number, related instructions. 3. BCD number representation (packed, unpacked, tetrad, pseudo-tetrad, half-byte carry). 4. Logical expressions (NOT, AND, OR, XOR ), shifting and rotation 5. Floating point conversions on 32 bit IEEE-754. 6. Introduction to Assembly programming in Visual Studio 7. Debug functions and usages inside Visual Studio 8. Basic instructions: data movements, arithmetic and logical instructions 9. Branching and loop instructions 10. Pointers, arrays, multi-dimensional arrays in assembly (using direct, indirect memory addressing) 11. Procedures and functions: methods, calling conventions 12. Call C/C++ functions inside assembly language 13. Complex task solving with assembly.

**Acquired competences:**

__Knowledge:__

- He/she knows the operations of hardware and software elements, the technology of their implementation, how to solve problems related to their operation and the possibilities of the interconnection of IT and other technical systems.
- He knows the vocabulary and special terms of the engineering profession in the Hungarian and English languages at least on the basic level.

__Skills:__

- He/she is abile to specify and implement embedded systems using the knowledge gained from his/her studies.
He/she can apply his/her knowledge acquired during his/her study to acquire deeper knowledge in the field of information engineering and to process special literature and solve problems related to information technology.
- He/she cooperates with other computer science engineers, electrical engineers during team work, and with other experts during the analysis and solution of a problems.
- He/she constantly improves his/her knowledge and keeps up with the development of the computer engineering profession.

__Attitude:__

- He/she genuinely represents the professional principles of engineering and information technology fields.
- He/she aims to see through the entire engineering system not only his/her own field.
- He/she makes an effort to work efficiently and to high standards.

__Autonomy and responsibilities:__

- He/she feels responsible for IT systems analysis, development and operation, both individually and as part of a team.
- He/she reveals the weaknesses of the technologies applied, risks of processes and initiates measures which reduce them.

__Additional professional competences:__

- Efficient use of digital technology, knowledge of digital solutions to fulfill educational objectives

**Requirements, evaluation, grading:**

**Mid-term study requirements:**

Scoring papers, study of the subject material. Criteria for awarding a practical grade: based on the sum of the marks awarded for the papers and the study, in accordance with the Regulations on Studies and Examinations.

**Exam requirements:**

**Study aids, laboratory background:**

**Compulsory readings:**

Jim Ledin: Modern Computer Architecture and Organization - Second Edition: Learn x86, ARM, and RISC-V architectures and the design of smartphones, PCs, and cloud servers 2nd ed., ISBN: 978-1803234519, Packt Publishing, 2022.

**Recommended readings:**

A. S. T. Tanenbaum: Structured Computer Organization (6th Edition), Prentice Hall, 2013. ISBN-13: 978-0-13-291652-3