Machine Language Flashcards

1
Q

unit of storage in current computer systems is

A

a binary valued bit

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

to understand machine language the first step is to understand

A

data representations using 0’s and 1’s

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

text representations

A

basic ascii
extended ascii
Unicode
Strings(concatenating representations of characters)

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

basic ascii is _ bits per character

A

7

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

extended ascii is _ bits per character

And can be used to represent ________

A

8

characters from languages other than english

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

Unicode typically is _ bits per character

A

16

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

End of a string often _________

Alternatively could include _________

A
null character (all 0 bits)
alternatively could include a count of the number of characters in the string(like java)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Represent unsigned integers

A

BCD

As base two (binary) numbers

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

BCD: _____________
supports ____________
inefficient _________ & ___________

A

use 4 bits to represent each decimal digit
languages such as COBOL that have decimal data types
inefficient use of storage & arithmetic operations

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

Binary #’s are ______ for computers but _________

A

efficient for computers but hard for people to work with

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

octal is base

A

8

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

hexidecimal is base

A

16

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

octal and hexidecimal are more ______________ and can easily ___________

A

more compact and easily readable by people and can easily be converted into binary

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

finite representation: It is important to note that in a computer system

A

There is a finite number of bits used to store numbers

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

for unsigned integers, using n bits and representation as base 2 numbers can represent integers from ________ to _____

A

0 to 2^n

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

sign magnitude

A

one bit for sign, and remaining bits store absolute value of number in binary

17
Q

with n bits in sign magnitude the range is

A

-((2^n -1)-1) to (2^n -1)-1

18
Q

disadvantages of sign magnitude

A

two representations of 0

hardware circuits implementing arithmetic are inefficient

19
Q

One’s complement

A

Representation of non-negatives same as unsigned

-x is x with all 0 changed to 1’s and vice versa

20
Q

One’s complement range with n bits

A

-((2^n -1) -1) to (2^n -1)-1

21
Q

Disadvantages and Advantages of one’s complement

A

two representations of zero

more efficient arithmetic operations

22
Q

Ones complement is used in _______

But is not used in __________, although it has been used for this in the past

A

internet communication when computing checksums used in packets for error detections purposes
Computer system representation of signed integers

23
Q

Current representation of signed integers used in computer systems

A

two’s complement

24
Q

Two’s complement

A

non-negative same as unsigned

negative involves changing 0’s to 1’s and 1’s to 0’s and then adding 1

25
Range of two's complement
-2^(n-1) to 2^(n-1)-1
26
to subtract 2's complement numbers
change to addition problem and get the negative
27
overflow
When the correct result is not representable in the current number of bits
28
unsigned overflow
overflow when operands and results represent unsigned integers
29
signed overflow
overflow when operands and results represent signed integers
30
in mips add and sub raise excpetions if ______, | and addu and subu _____
signed overflow occurs, | do not
31
C compiler always uses
addu and subu
32
Mips machine language is ______
fixed length (32 bits)
33
Mips formats
I format J format R format
34
op field
uniquely identifies the instruction type for I, J format instructions
35
R format instructions have | type given in
0 in op field | funct field
36
A bigger op field could ________, but ________
always uniquely identify instruction type | there is not enough bits for I and J formatting
37
32 registers means that each register is
32 bits
38
a large constant can be put in a register by
separately loading the value into the upper 16 bits and a value into the lower 16 bits
39
16 bit values are small enough
to fit in the numeric constant field in the I format