Docsity

formula sheet for computer science, Cheat Sheet of Computer science

Toggle sidebar
bg1
COMPUTER SCIENCE FORMULA SHEET
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
NUMBER SYSTEMS
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Binary to Decimal
Multiply each binary digit by powers of 2
Example:
1011 = 8 + 0 + 2 + 1 = 11
Decimal to Binary
Repeated division by 2
Octal to Decimal
Multiply each digit by powers of 8
Hexadecimal to Decimal
Multiply each digit by powers of 16
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
DATA STORAGE
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
1 Nibble = 4 Bits
1 Byte = 8 Bits
1 Kilobyte (KB) = 1024 Bytes
pf3
pf4
pf5

Partial preview of the text

Download formula sheet for computer science and more Cheat Sheet Computer science in PDF only on Docsity!

COMPUTER SCIENCE FORMULA SHEET

NUMBER SYSTEMS

Binary to Decimal Multiply each binary digit by powers of 2 Example: 1011 = 8 + 0 + 2 + 1 = 11 Decimal to Binary Repeated division by 2 Octal to Decimal Multiply each digit by powers of 8 Hexadecimal to Decimal Multiply each digit by powers of 16 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” DATA STORAGE โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 1 Nibble = 4 Bits 1 Byte = 8 Bits 1 Kilobyte (KB) = 1024 Bytes

1 Megabyte (MB) = 1024 KB 1 Gigabyte (GB) = 1024 MB 1 Terabyte (TB) = 1024 GB โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” LOGIC GATES โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” AND Gate Output = 1 only if both inputs are 1 OR Gate Output = 1 if at least one input is 1 NOT Gate Reverses the input NAND Gate NOT + AND NOR Gate NOT + OR XOR Gate Output = 1 if inputs are different โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”

PSEUDOCODE

Input INPUT name Output OUTPUT result Condition IF condition THEN Loop FOR / WHILE / REPEAT โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” BOOLEAN LOGIC โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” TRUE = 1 FALSE = 0 NOT A Reverses A A AND B True only if both are true

A OR B

True if one or both are true โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” IMPORTANT FORMULAS โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” Binary Addition Rules 0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 10 1 + 1 + 1 = 11 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” IMPORTANT FACTS โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” CPU = Central Processing Unit RAM = Random Access Memory ROM = Read-Only Memory ALU = Arithmetic Logic Unit CU = Control Unit ICT = Information and Communication Technology