Top Computer Science Formulas

Important computer science formulas and concepts.

1
Binary to Decimal Conversion
Decimal Value = Σ(bit × 2^position)

Convert a binary number into decimal.

View Explanation
2
Data Transfer Rate
Transfer Rate = Data Transferred / Time Taken

Calculate average data transfer rate.

View Explanation
3
Time Complexity of Binary Search
Time Complexity = O(log n)

Describe the asymptotic search time of binary search.

View Explanation
4
Decimal to Binary Conversion
Repeatedly divide by 2 and read remainders in reverse order.

Convert a non-negative decimal integer to binary.

View Explanation
5
Storage Unit Conversion
1 byte = 8 bits; 1 KiB = 1024 bytes; 1 MiB = 1024 KiB

Convert common digital storage units.

View Explanation
6
CPU Execution Time
CPU Time = Instruction Count × CPI × Clock Cycle Time

Estimate CPU execution time.

View Explanation
7
Binary Addition
0+0=0; 0+1=1; 1+0=1; 1+1=10

Apply basic binary addition rules.

View Explanation
8
Two Complement
Two’s Complement = Invert all bits + 1

Find the two’s complement representation of a negative integer.

View Explanation
9
Binary Subtraction
Use 2’s complement or borrow method

Perform subtraction of binary numbers.

View Explanation
10
Hexadecimal to Decimal
Decimal = Σ(digit × 16^position)

Convert hexadecimal number to decimal.

View Explanation
11
Time Complexity Bubble Sort
Best O(n), Average/Worst O(n²)

Describe time complexity of bubble sort.

View Explanation
12
Stack Operations
Push, Pop, Peek – LIFO

Understand basic stack operations.

View Explanation
13
OSI Model Layers
7 Layers: Physical → Application

Remember the seven layers of OSI model.

View Explanation
14
IP Address Classes
A: 1-126, B: 128-191, C: 192-223

Identify class of an IPv4 address.

View Explanation
15
Normalization 1NF
1NF: Atomic values, no repeating groups

Define First Normal Form.

View Explanation
16
CPU Performance Equation
CPU Time = IC × CPI × Clock Cycle Time

Estimate program execution time.

View Explanation
17
Ohm Law in Computer Circuits
V = I × R; P = V × I

Calculate voltage and electrical power in basic circuits.

View Explanation
18
Amdahl Law
Speedup = 1 / [(1 - P) + P/S]

Estimate speedup from parallel processing.

View Explanation
19
IPv4 Address Size
IPv4 Address Size = 32 bits = 4 octets

Remember the structure of an IPv4 address.

View Explanation
20
Network Throughput
Throughput = Successfully Transferred Data / Time

Calculate effective data transfer rate.

View Explanation
21
Database Normalization
Normalization = Organizing Relations to Reduce Redundancy and Anomalies

Understand the purpose of database normalization.

View Explanation
22
Big O Linear Search
Best Case = O(1); Average/Worst Case = O(n)

Describe the time complexity of linear search.

View Explanation
23
Queue Operations
Enqueue, Dequeue – FIFO

Understand basic queue operations.

View Explanation
24
Database Primary Key
Primary Key uniquely identifies each row

Understand the role of primary key.

View Explanation