Lec 1 Flashcards
(47 cards)
What is a computer
A computer is machine that can be programmed to carry out a wide variety of task
What is a program
A program or software is a set of instructions the computer follows to perform a task
What is a programmer
A programmer is someone trained to test computer programs
What is hardware
All the physical devices that make up a computer
-Note a computer is not a single device but a system of devices that work togther
What type of hardware makes makes up a computer and how you interact with them
Central Processing unit-Processes information, “the computers brain”
Main memory-RAM
Secondary Storage-disk, drive, ss, drives, usb, CDS, floppy disk(Physical memory)
Input devices-mouse, keyboards,microphones, webcame
Output devices monitor, printers, disk drives
Cell phone-listen to music through speakers
What can a computer do without software
A computer can’t do anything without software
How do computers store information digitally
Computer store information digitally into units of bits and bytes. Bytes are storage locations, where each byte can be stored.
What is a bit
A bit is a binary digit and 8 bits per bytes
-Switches on is 1 and switched off is 0
How to count in Binary
01101100
represent 115
bytes 1 is 2^15——–2^8
bytes 2 is 2^7——–2^0
What is the largest number that can be stored on one bytes
it is 255 because because add all the solutions of 2 ^x togather get you to 255
8516 is a decimal represented as
00100001 01000100
2^13–2^8–2^6—-2^2=8516
What is ASCII
The American standard code for information is a systems developed to represent text information
How does ASCII work
Each letter is case sensitive, and is assigned a decimal value and that gets converted and stored as binary values that the computer can undertsand and work with
Example
Binary-01000001
Decimal 65
Character is A
Binary-01100001
Decimal 95
Charavter a
How do program work
Computer store information i binary and the the central processing unit can only understands in 1 and 0’s called machine language
Example machine language input is 100110000 may tell computer to move values from storage to memory
What cpu can and can’t do
CPU’s can only perform simple task(add, subtract, divide, move from memory to storage, store, compare and programs in machine language are thosand of lines long ,so you need assembley language
What is assembly language
It was written in response to CPU only doing simple task but we have long lines of code.
Assembly language is one of the oldest programming languages. It is characterized by add, mul, mov
What does assembly language do
An assembler will translate assembly language into machine language, so the computer can execute the program .Assembly is low level language because it is extremely simple and close to machine language
Assembler language(add, mul, mov) to assembler to Machine language(binary)
What his high level language
High level language allows complex programs to be written without needing to know machine language-MatLab, CTT, CLT, JAVA, python,SQL
Each language has it own syntax
What is high level language syntax
They are rules that must be followed in order to write a program(like grammatical rules in language)Syntax indicates key words, operators, and punctuations can be used
Example:Like in Mat lab “NOT” is a wavey line but in CTT or Java… its !
What is an compiler
A compiler takes the entire program written in high level language, and translate it to machine language so the computer can understand it
-The language version of the program is executed in a separate step and the compiler give those machine language instructions to the CPU
-A program in compiler language will not work with errors of bugs
What are the two catagoies for high level language
Compiler or Interpreter language
What is an interpreter language
An interpreter take a high level program line by line and translates it into machine language so the computer can understand it
The interpreter is also executing the machine language program immediately(line by line as translated) and provides the machine language instructions to the CPU
An interpreter will run the program line by line until an error is found and then it will stop
How to design a program
A computer must be programmed to achieve a set of task. A programmers will typically use high level language. They never start code right way but create a design of the program.
Even though each program language has it own syntax- the logic and flow of information stays the same
Program development design
It is continuous refinement and maintenance process
1.Requirment analysis(User need)
2.Program Design stage(Map solution)
3.Implementation(Do)
4.Documentation and Testing(Write down who fixed or designed)
5.Operation and Maintenance(Revise solution and future maintenance)