Harvard CS50 Week 0 Notes

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

designed

Algorithms need to not just be correct but well __________

little steps

Algorithms should take as ____________ as possible to improve efficiency.

372.

Based on the knowledge from the previous notecard, what number is "101110100" in the base 10 system?

Loops.

Cycles in a program are called

256

Generally each color in a pixel is stored as 1 byte or 8 bits with ___ possible values.

8 bits equals a byte.

How big is 1 byte?

8 bits or 1 byte

How many bits does 1 letter represent on a computer?

16 bits. The newest Unicode standard (Unicode 2.0) uses up to 32 bits.

How many bits does Unicode use?

transistors.

Instead of a switch, what is used to represent 0s and 1s in modern day computers?

logarithmic

It is best to have a _______ algorithm rather than a linear one because it takes less time.

The numbers 0-9. Once we count up past 9, we carry a 1 to the left and start at 0 again (i.e. the number "10")

What numbers are represented in the base 10 (otherwise known as decimal) system?

Computers use a base 2 or binary system to represent numbers. Computers store 0s and 1s and when we try to count past 1, we carry the "1" to the left ("10" in a base 2 system represents the number 2)

What system do computers use?

Unicode

What system do letters with accent marks and specials symbols use to map numbers to letters

RGB (Stands for Red, Green and Blue. By controlling how much red green and blue is emitted, we can create every color humans can perceive.)

What system is most commonly used to map numbers to colors on a screen?

ASCII is the standard.

What system maps numbers to letters in computers?

Because electricity is required for a computer to run, we can simply use 2 states (a switch that is ON and a switch that is OFF) to represent 2 numbers. Making a computer off of a base 10 system would be much more complicated.

Why were computers designed based off a base 2 system?

64 values. The first digit starting at the right of the binary number is 2 to the zeroth power or "1". The 2nd digit is 2 to the which is "2". The next is 2 to the 2nd which is "4". The next is 2 to the 3rd which is "8" and so forth.

just like we use the 10's place and 100's place in the base 10 system, we have similar digit place values in the binary system. What is the highest number of values (including 0) can you store in 2 to the 6th power of bits?

Algorithms are step-by-step solutions for solving problems.

What are algorithms?

Booleans only hold true or false statements which decide where we want to go in our program.

What are booleans?

Actions within a program.

What are functions?

It stores a value

What does a variable do?

It is the process of taking some input (details about our problem) and generate some output (the solution).

What is Problem Solving in CS terms?

A bit (represented as either a 0 or 1)

What is a singular binary digit called when talking terms of computers?

Problem Solving

What is computer science on a fundamental level?

A representation of an algorithm using precise English (or any other human language)

What is pseudocode?

7 is the highest number you can represent. It is not 8, because when every switch is off (otherwise known as 000 in binary) you start off with the number "0". with 3 switches you can store up to 8 numbers, but only 7 "non-zero" numbers. The numbers you can store are: 000 (0), 001 (1), 010 (2), 011 (3), 100 (4), 101 (5), 110 (6), and 111 (7).

What is the highest number you can represent with 3 switches that can either be "ON" or "OFF"?

You can count up to the number 255 but can have 256 total valued (We start counting at zero)

What is the highest value you can count up to with 1 byte (or 8 bits)

It is talking about how many pixels an image/video has.

What is the resolution of an image or video?


Kaugnay na mga set ng pag-aaral

Physics 1 Second Test (Conceptual & PreLecture)

View Set

Chapter 21 International corporate finance

View Set

Chapter 19 Vocabulary: Procedural Coding

View Set

Life and Health Producer License

View Set

ASU 181- Unit 2- Module 4b-Nucleus

View Set

Countries of South America SMCHS

View Set