0: What is computer science?
Computer science is less about programming than about problem soving, and need to be precise and methodical.
Problem soving can seem as the prosess of taking some input (a problem we want to solve) and generate some **output **(the solution to our problem). So we can find a way to reprsent inputs and outputs, which can help us store and work with information in a standardized way.
0.1 Representing formats
Numbers
- Unary: each digit represents a single value of one (like counting the number of people using fingers).
- Decimal
- Binary: just with two digits, o and 1.
- Each binary digit is called a bit. 8 eight bits called one byte.
- Since computers run on electricity, which can be turn on or off, we can represent a bit by just tuning somg swith on or off to reprent a 0 or 1. And there are billions of tiny switches calles transistors that can be turned on and off to represent different valunes.
- Most computers use 8 bits at a time.
22 21 20
Text
- The question is how numbers map to letters?
- A standard mapping: ASCII (letters and punctuation). Unicode(marks and symbols).
- By using context, like the file format, different programs can interpret and display the same bits as numbers or text.
- Because only the descriptions have been standardized, so diffenrent companies will have slightly different images that represent each emoji.
Image, video, sounds
- RGB: represent colors by indicatng the amound of red, green, and blue within each color.
- The dots, or squares, on our screen are called pixels,and images are made up of many thousands or millions of thouse pixels,
- Videos are sequences of many images, changing multiple times a second to give us the appearance of motion.
- MIDI:one format represent music with number for the notes and their duration and volum.
All of this ideas are just zeroes and ones, interpret and used by softwares we’ve written to interpret them in the ways that we want.
- Other formats: Compression:mathematical ways to represents some data with fewer bits). Container: store mutiple types of data together .
0.2 Algorithem
The black box that *transforms inputs to outputs * contains algorithems, step by step instructions for soving problems: