Binary Data Representation Flashcards
binary format
All data is stored in computers using binary format which consists of zeroes (0) and ones (1)
bit
Each individual zero or one is known as a bit
byte
Bits are stored and processed in 8 bit combinations known as a byte
binary number position
In Binary Numbers, each position is worth two times the position to the right
converting binary numbers to decimal
A Binary Number is converted to decimal by adding the value of each binary position that contains a 1
notation
binary numbers have a notation of 2
decimal numbers have a notation of 10
converting decimal numbers to binary
- Setup enough binary columns to accommodate the decimal number
- Expand to the byte boundary and fill with zeroes
- Put a one in the column that represents the largest binary value in the decimal number that is being converted
- Subtract the binary value from the original number to determine what is left
- Put a one in the column that represents the largest binary value in the decimal number that remains
- Subtract the binary value from the to determine what is left
- Repeat until the result is 0
binary addition
Binary Addition is performed column by column starting at the right-hand column
(only 4 possible combinations: 0+0=0, 1+0=1,0+1=1,1+1=10)
binary subtraction
Binary subtraction is performed column by column starting at the right-hand column
(taking from a column to the left with 1 in it results in a 2 where the 0 originally was)
binary AND operation
Binary And operation compares two binary bytes to determine which columns contain 1s in both number
Columns in the result are set to 1 if both bits are 1; otherwise it is set to 0
binary OR operation
Binary Or operation compares two binary bytes to determine which columns contain 1s in either number
Columns in the result are set to 1 if either bit is 1; otherwise it is set to 0
hexadecimal
Hexadecimal (hex) math uses the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E & F to represent numbers and allows you to count from zero to fifteen in each column
hex math
In hex math, you can count from 0 (hex character 0) to 15 (hex character F) in one column
Since you run out of characters at F (15), you need to go to the next column to count to 16
In hex math, each column is worth 16 times the column to the right
converting from hex to decimal
Convert from hex to decimal by multiplying the value of the hex character times the value of the hex column
converting from decimal to hex
The procedure for converting from decimal to hex is the same as the procedure for converting from binary to hex except that you use the binary column values instead of the hex column values