S3 Data Representation Flashcards
What does a NOT gate look like?
Truth table?
Input —| >o— Output
Input Output
0 1
1 0
What does an AND gate look like?
Truth table?
_______________
Input A—| )___Output
Input B—|____ )
A B Output
0 0 0
1 0 0
0 1 0
1 1 1
What does an OR gate look like?
Truth table?
_______________
Input A—| \___Output
Input B—|____/
A B Output
0 0 0
1 0 1
0 1 1
1 1 1
What does an XOR gate look like?
Truth table?
_________________
Input A—\ \ \___Output
Input B—/ / _____/
A B Output
0 0 0
1 0 1
0 1 1
1 1 0
What is a logic gate?
Circuits built into computer chips
- they receive binary data
- apply a Boolean operation
- output a binary resume
Symbol for A AND B
A . B
Symbol for NOT A
Ā
Symbol for A OR B
A + B
Symbol for XOR B
A (+) B
Convert 300 kB to bits
300kB = 300 x 1000 = 300 000 bytes
300 000 bytes = 300 000 x 8
=2 400 000 bits
What is the order of the sizes of bits and bytes?
Bit
Nibble
Byte
Kilobyte
Megabyte
Gigabyte
Terabyte
What is 1+1 in binary?
What is 1+0 in binary?
10
01
What is 1011 after having a 2 place shift left?
What is the effect of this shift?
10
÷4
Why do programmers prefer hex?
- simpler to remember larger numbers
- Due to hex being shorter, less chance of input errors
- easier to convert between binary and hex than binary and decimal
What is hex 87 in decimal?
8 x 16 = 128
7 x 1 = 7
128 + 7 = 135