1.2.3 Introduction to Programming

studied byStudied by 0 people
0.0(0)
get a hint
hint

what are the three main programming constructs used in procedural programming?

1 / 12

Tags and Description

13 Terms

1

what are the three main programming constructs used in procedural programming?

sequence, selection, iteration

New cards
2

how does assembly language differ from machine code?

assembly language uses mnemonics rather than binary, one line in assembly language is equal to one line in machine code

New cards
3

function of the STA mnemonic?

storing the value in the accumulator at the given memory address

New cards
4

function of the BRP mnemonic?

branches to a given address if the value in the accumulator is positive, it is a conditional branch.

New cards
5

describe how selection works

a certain block of code is run if a specific condition is met, using IF, ELSE IF and ELSE statements

New cards
6

how do variables and constants differ?

the value of a constant cannot be edited by the program during execution while the contents of a variable can be changed

New cards
7

when might constants be used?

for values that do not need to be changed or to prevent a value from being accidentally changed

New cards
8

define what is meant by a function

a named block of code that performs a specific task and must always return a single value

New cards
9

role of the MOD function?

MOD (or %) is used to find the remainder when a number is divided by another

New cards
10

what are relational operators used for?

relational operators are used to make comparisons between two values and produce a result of either true or false

New cards
11

what is the function of the == operator?

== is used to check whether a value is identical to another

New cards
12

three Boolean operators

AND, OR and NOT

New cards
13

what programming structure is used when a certain section of code needs to be executed while a certain condition remains true?

iteration - specifically a WHILE loop

New cards

Explore top notes

note Note
studied byStudied by 10 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 6 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 9 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 15 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 6 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 14414 people
Updated ... ago
4.8 Stars(125)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 150 people
Updated ... ago
5.0 Stars(6)

Explore top flashcards

flashcards Flashcard46 terms
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard33 terms
studied byStudied by 15 people
Updated ... ago
4.5 Stars(91)
flashcards Flashcard39 terms
studied byStudied by 12 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard31 terms
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard33 terms
studied byStudied by 2 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard30 terms
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard40 terms
studied byStudied by 27 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard33 terms
studied byStudied by 33 people
Updated ... ago
5.0 Stars(2)