Machine Language Flashcards
unit of storage in current computer systems is
a binary valued bit
to understand machine language the first step is to understand
data representations using 0’s and 1’s
text representations
basic ascii
extended ascii
Unicode
Strings(concatenating representations of characters)
basic ascii is _ bits per character
7
extended ascii is _ bits per character
And can be used to represent ________
8
characters from languages other than english
Unicode typically is _ bits per character
16
End of a string often _________
Alternatively could include _________
null character (all 0 bits) alternatively could include a count of the number of characters in the string(like java)
Represent unsigned integers
BCD
As base two (binary) numbers
BCD: _____________
supports ____________
inefficient _________ & ___________
use 4 bits to represent each decimal digit
languages such as COBOL that have decimal data types
inefficient use of storage & arithmetic operations
Binary #’s are ______ for computers but _________
efficient for computers but hard for people to work with
octal is base
8
hexidecimal is base
16
octal and hexidecimal are more ______________ and can easily ___________
more compact and easily readable by people and can easily be converted into binary
finite representation: It is important to note that in a computer system
There is a finite number of bits used to store numbers
for unsigned integers, using n bits and representation as base 2 numbers can represent integers from ________ to _____
0 to 2^n
sign magnitude
one bit for sign, and remaining bits store absolute value of number in binary
with n bits in sign magnitude the range is
-((2^n -1)-1) to (2^n -1)-1
disadvantages of sign magnitude
two representations of 0
hardware circuits implementing arithmetic are inefficient
One’s complement
Representation of non-negatives same as unsigned
-x is x with all 0 changed to 1’s and vice versa
One’s complement range with n bits
-((2^n -1) -1) to (2^n -1)-1
Disadvantages and Advantages of one’s complement
two representations of zero
more efficient arithmetic operations
Ones complement is used in _______
But is not used in __________, although it has been used for this in the past
internet communication when computing checksums used in packets for error detections purposes
Computer system representation of signed integers
Current representation of signed integers used in computer systems
two’s complement
Two’s complement
non-negative same as unsigned
negative involves changing 0’s to 1’s and 1’s to 0’s and then adding 1