1.2.4 Types of Programming Language Flashcards
1.2.4 A)
What is a program paradigms
Are approaches to using a program language to solve problems.
1.2.4 A)
Types of program paradigms
imperative and decleartive
1.2.4 A)
What is imperative
Code clearly specify the action to be preformed
1.2.4 A)
What is declarative
Focus on declaring the desired result. Details on how its obtained are abstracted from the user
1.2.4 A)
Type of imperative
procedual - python
oop
1.2.4 A)
Type of declaratuve
functional - reusing func
logic - quries to find problem - sql
1.2.4 B)
properites of procedual programming
Easy to implement ,not possible to solve all problems or maybe ineff
1.2.4 B)
Four main programming structure
Sequence - execute line by line top to bottom
Selection - Code is run if a specific condition is met
iteration - code is run a # of time or while condtion true
Recursion - Func are expression in terms of themselves until conditions is met known as base case
1.2.4 B)
What is procedual programming suited for
is suited to probelsm that can be easly be expressed as a series of instructions
1.2.4 C)
What is assembly language
Next level up from machine code low level language converted to machine code using an assembler
1.2.4 C)
explain LLL
language based on instruction set of the computer
1.2.4 C)
How does AL use mnemonics
uses mnemonics rather then binary easier to use than direct machine code. Mnemoics represent numeric code
Processor specific as it directly interacts with cpu purpose register
1.2.4 C)
What is Assembly language used for and why
useful for embedded ssytems as allows for direct interactions with hardware
1.2.4 C)
Mnemocs > instructions > functions
AS SLIO HD BBB
ADD > add > adds values @ memory and acc
SUB > subtract > sub value @ memory from acc
STA > store > Value at acc at address
LDA > load > value at mm to acc
INP > input > user input stored to acc
OUT > output > print value at acc
HLT > halt > stops execution
DAT > data > flag w/ label with data is stored
BRZ > branch if 0 > *BR is zero *CB
BRP > branch if + > *BR is positive *CB
BRA > branch always > branch to given address no matter of acc value, uncoditonal branch
*BR = branch to given address if acc value
CB - conditonal branch
1.2.4 D)
What two components make up machine code instructions
opcode and operand