data types Flashcards
(14 cards)
what is an integer?
a whole number
can be negative
what is a real? /float
positive or negative numbers that can (not always) have a fractional part
what is a character? /char
single symbol
can be: letters, numbers, symbols
what is a string?
a collection of characters
what is boolean?
true or false
binary to decimal
add the numbers with 1
denery to binary
write only the binary digits below the denery number
from left, if the digit goes into the denery replace it with a 1 and subtract it from the decimal
if they ask for bytes add necessary 0s from the left
binary addition
1 + 1 = 0 carry 1
1 + 0 =1
0 + 0 =0
hexadecimal comparison
0-9 decimal = 0-9 hex
10-15 decimal = A-F hex
hexadecimal to decimal
from left to right the hex numbers are 16^0, 16^1, 16^2, 16^3
X the answers to those by the corresponding decimal for the hex digit
add all together
what does hexadecimal always start with
16^0
hexadecimal to binary
split the hex apart
convert the hex’s to corresponding decimals
convert the decimals to binary nibbles
put back together
what is ASCII
-american standard code for information exchange
-keyboard character set
-uses 7 bits to represent 128 different characters including capital, small letters, numbers, symbols
what is Unicode?
-solves the problem of ASCIIs limited character set
-uses a varying number of bits allowing for over 1 million different characters
-represents characters that haven’t been allocated yet and also other languages