Course detail
Introduction to Programming
FEKT-BPC-UDPAcad. year: 2023/2024
The first part of course familiarizes students with numbers storage in computer (integer number, floating point numbers, IEEE 754-2008 standard, BFloat16), binary arithmetic, characters coding (ASCII, ISO-8859-X, UNICODE), Von Neumann principles and concept of the computer. The second part is focused on foundations of C language programming. The students should learn to use variables of basic and derived types, operators, assignment commands, branch statements, loop statements, employ functions, strings, I/O functions and locale.
Language of instruction
Number of ECTS credits
Mode of study
Guarantor
Entry knowledge
Rules for evaluation and completion of the course
Up to 50 points for the final examination (minimum 20 points).
Computer exercises are mandatory, it is possible to replace the properly excused missed computer exercises.
Aims
Absolvent knows:
- Binary, octal and hexadecimal numeral systems. Translation between numeral systems.
- Negative numbers representation and float point numbers representation in the computer.
- Binary arithmetic.
- Character encoding. Binary data encoding by printable characters.
- Basic Von Neumann principles of computer operation.
- C language syntax and semantics.
Absolvent is able to create a simple C language program.
Study aids
Prerequisites and corequisites
Basic literature
Recommended reading
KERNIGHAN, B. W., RITCHIE, D. M.: Programovací jazyk C. Brno: Computer Press, 2006. 286 s. ISBN 80-251-0897-X. (CS)
Elearning
Classification of course in study plans
- Programme BPC-AMT Bachelor's 1 year of study, winter semester, compulsory
Type of course unit
Exercise in computer lab
Teacher / Lecturer
Syllabus
2. Příklady na sčítání a odčítání čísel ve dvojkové soustavě. Příklady na reprezentaci čísel v přímém binárním kódu (sign-magnitude), v 1. a 2. doplňku a v kódu s posunutou nulou.
3. Příklady na násobení a dělení čísel ve dvojkové soustavě. Příklady na vyjádření čísel s pohyblivou řádovou čárkou dle standardu IEEE 754-2008 a ve formátu BFloat16. Příklady na kódování znaků dle standardů ASCII, ISO-8859-2 a UNICODE (UTF-32, UTF-16, UTF-8).
4. Příklady na popis algoritmu pomocí vývojového diagramu.
5. Seznámení s vývojovým prostředím MS Visual Studio 2022 a laděním programů. Funkce main(), návratové kódy programů. Vstup z klávesnice ,výstup na obrazovku, velikosti jednoduchých datových typů.
6. Příklady na použití operátorů ve výrazech, příkazů if – else a příkazu while.
7. Příklady na práci s poli, použití příkazu for, definici, deklaraci a volání jednoduchých funkcí.
8. Příklady na práci s datovým typem struktura.
9. Test 1.
10. Příklady na základní práci s ukazateli na proměnné a funkce. Příklad na předávání ukazatele na pole do funkcí a práci s VLA. Příklad na dynamickou alokaci paměti.
11. Příklady na použití knihovních funkcí pro ráci se soubory. Příklad na práci s dynamicky alokovaným polem struktur.
12. Příklad na podmíněný překlad a použití maker s parametry. Příklad na práci s vícebytovými (UTF-8) řetězci a locale.
13. Test 2.
Elearning