You are on page 1of 17

C#

Basics

By Lusine Hovsepyan
INTRODUCTION TO PROGRAMMING AND COMPUTER FUNDAMENTALS

Digital computer has the following 5 functionalities:


Step 1 − Takes data as input.
Step 2 − Stores the data/instructions in its memory and uses them as required.
Step 3 − Processes the data and converts it into useful information.
Step 4 − Generates the output.
Step 5 − Controls all the above four steps.
CPU (CENTRAL PROCESSING UNIT)

CPU is the brain of the computer


CPU's functionality
CPU performs all types of data processing operations.
It stores data, intermediate results, and instructions (program).
It controls the operation of all parts of the computer.
CPU (CENTRAL PROCESSING UNIT)

CPU consists of 2 components


> Control Unit
> Arithmetic Logic Unit
RAM (RANDOM ACCESS MEMORY)

RAM is the internal memory of CPU


RAM is volatile (անկայուն)- data stored in it is lost when we switch
off the computer or if there is a power failure.

ROM (READ ONLY MEMORY)

ROM is memory from which we can only read but cannot write on it.
ROM is non-volatile, stores, for example, instructions to start the
computer. Is located on the motherboard.
HDD (HARD DISK DRIVE)

HDD is the storage (non-volatile) keeping information even when


the computer is turned off. HDD contains a circular disc, the
faster the platter spins, the faster the hard drive works, which
can impact how quickly your operating system respond.

SSD (SOLID STATE DRIVE)

SSD used flash memory, typically more resistant to physical


shock, run silently, and have quicker access time and
lower latency.
WHAT IS SOFTWARE?

Software is a set of programs, which is designed to


perform a well-defined function. A program is a sequence
of instructions written to solve a particular problem.
NUMBER SYSTEMS

When we type something computer translates it to the numbers to


understand it.
All computers work with 0’s and 1’s (binary numbers) so it is like learning
alphabets before learning English

Base conversion
For convenience, people use other bases (like decimal, hexadecimal) and
we need to know how to convert from one to another.
NUMBER SYSTEMS
NUMBER SYSTEMS
BINARY NUMBER SYSTEM

Uses two digits, 0 and 1


Also called as base 2 number system

DECIMAL NUMBER SYSTEM

We use in our day-to-day life is the decimal number system


Uses ten digits, 0 - 9
Also called as base 10 number system
Each position represents a specific power of the base (10)

For example decimal number 1234 consists of:


(1 x 1000)+ (2 x 100)+ (3 x 10)+ (4 x l)
(1 x 10^3)+ (2 x 10^2)+ (3 x 10^1)+ (4 x 10^0)
1000 + 200 + 30 + 4
1234
BINARY --> DECIMAL CONVERSION

Binary Number: 10101


Calculating Decimal Equivalent − 21
DECIMAL --> BINARY CONVERSION

Decimal Number: 29
Calculating Binary Equivalent − 11101
OCTAL NUMBER SYSTEM

Uses eight digits, 0,1,2,3,4,5,6,7


Also called as base 8 number system
Each position represents a specific power of the base (8)
OCTAL--> BINARY CONVERSION

Octal Number: 25
Calculating Binary Equivalent − 10101
OCTAL--> BINARY CONVERSION
HEXADECIMAL NUMBER SYSTEM
Uses 10 digits and 6 letters, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F
Also called as base 16 number system
Letters represent the numbers starting from 10. A = 10. B = 11, C = 12, D = 13, E = 14, F = 15
Each position represents a specific power of the base (16)

Hexadecimal Number: 19FDE


Calculating Decimal Equivalent − 106462

You might also like