boring programming Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Imperative programming?

A

Where we tell the computer what to do

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Add subtract store and load LMC instructions (3 letters(

A

ADD
SUB
STA
LDA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

LMC branch instructions

A

BRA - ALWAYS
BRZ - IF ZERO
BRP - IF POSITIVE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

LMC PRINT, READ INSTRUCTIONS

A

INP

OUT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

LMC end program instruction

A

HLT (halt)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

LMC DAT instruction what is it

A

It’s normal asm like data in the bss/data section

notify assembler it’s a static piece of data like a string in the exe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

LMC where are labels put

A

Before any instruction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Direct vs immediate addressing

A

Direct is normal like pointer deference
Immediate is not really addressing just means load the actual data not the address (deferencing the pointer is just getting the pointer int value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Indirect vs indexed addressing

A

Indirect is double pointer deferenencing (ie LDA 6 would mean load the value from the pointer which the pointer is at memory location address 6)
Indexed is when you have an index register and then can increment it etc

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What tags are needed for a HTML page with a title, a heading and some paragraph

A

Head,body,title,h1,p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are how use the IMG tag HTML

A

<img></img>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How to embed link in html

A

<a>CLICK ME</a>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does html ordered list look like and how

A

Numbered list of the data

<ol> is used and <li> for each item both are terminated</li></ol>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

HTML unordered list

A

with <li> uses bullet points</li>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What tag includes CSS into html

A

Style

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Where can the style tag be used

A

As an attribute and as a normal embedded CSS

17
Q

CSS font family semantics

A

Define multiple in order of which to use if one is not available

18
Q

How to link to use a separate CSS file

A

HTML link tag

19
Q

DIV tag and how to style it in CSS

A

use div with a “class” attribute and in the CSS use a dot prefix

20
Q

How to use IDs in CSS with html

A

In a tag such as paragraph or header or list, add an Id attrib and in the css use a hashtag

21
Q

what is needed to make HTML form which has a submit button and an input box and execute a server file to handle the data

A

Form tag using ID and action linking to a php
Inside the tag space add a label tag with text
Add an input tag with a type attribute of text and id and a name for the input tag
Add another input tag with a type attribute of submit and name submit and VALUE tag of submit as well which is displayed on the button

22
Q

What attribute links a tag with a JS function

A

onclick=“somefunction()”

23
Q

What is the html script tag used for

A

Embedding JS

24
Q

How to get a tag value in JS

A

document.getElementById(“some tag id”)

25
Q

How to set raw HTML string in JS

A

getElementById(“…”).innerHTML

26
Q

How to put a “page says” message in browser in js

A

alert(“hi”);

27
Q

What is a heuristic approach to problem solving (2)

A

Educated guess approach (1)

Which leads to a “good enough” result

28
Q

Example of heuristics when making a decision about if to cross a busy road (3)

A

Any 3 of
We dont get data (1) about all vehicle speeds (1)
We scan the data for which is most likely to be useful (1)
And make a judgement based on experience (1)

29
Q

MDR vs MAR

A

MDR is the actual instruction fetched

MAR is the current address instruction

30
Q

What bus and what gets sent down when loading/storing in LMC

A

CONTROL BUS

Read or write signal

31
Q

What is the memory management where it’s split into chunks

A

PAGING

32
Q

What happens when a search engine indexes a page (3)

A
web crawler (1) transverses web (1)
takes each word in the document and adds an entry (1)
33
Q

Why does RISC have less power consumption

A

less transistors