Computational Thinking

 Computational Thinking

blog by : Sanket S Nalegaonkar

Introduction of Computer

Computers can be used to help us solve problems. However, before a problem can be tackled, the problem itself and the ways in which it could be solved need to be understood. Computational thinking allows us to do this.


  • The four cornerstones of computational thinking

  1. decomposition - breaking down a complex problem or system into smaller, more manageable parts
  2. pattern recognition – looking for similarities among and within problems
  3. abstraction – focusing on the important information only, ignoring irrelevant detail
  4. algorithms - developing a step-by-step solution to the problem, or the rules to follow to solve the problem


There are four key techniques (cornerstones) to computational thinking:



Computational Thinking

A complex problem is one that, at first glance, we don't know how to solve easily.Computational thinking involves taking that complex problem and breaking it down into a series of small, more manageable problems (decomposition). Each of these smaller problems can then be looked at individually, considering how similar problems have been solved previously (pattern recognition) and focusing only on the important details, while ignoring irrelevant information (abstraction). Next, simple steps or rules to solve each of the smaller problems can be designed (algorithms).

Finally, these simple steps or rules are used to program a computer to help solve the complex problem in the best way.


Binary and ASCII

There are two different communication formats that are available when sending PostScript files from a Mac based system. They are ASCII and Binary. You can upload text and CGI documents in ASCII mode and mages, sounds etc. should be uploaded in BINARY mode. Which means, Ascii mode transfers files as ‘text’.   Examples of ASCII files would be .txt, .asp, .html, and. php files where Binary mode transfers files as raw data. Examples of binary files would be .wav, .jpg, .gif, and mp3 files…


  • Binary :

Binary mode is used for transferring executable programs, compressed files, and all image/picture files. If you try to upload an image in ASCII mode, you observe a strange mess appearing on the page where the image is supposed to appear. ASCII mode, in this case, has corrupted the binary coding in the jpeg or gif image. A binary file is executables, sound files, image files, object files… etc…What makes them binary is merely the fact that each byte of a binary file can be one of 256-bit patterns. Binary encoding more commonly known as BCP (Binary Communications Protocol), is made up of values in the range of 0-255. Binary files are composed of a long series of the characters “1” and “0” in complex configurations. This differs from ASCII in that the characters can be used to create any kind of data, from text to images. Most elements of the language, such as integers, real numbers, and operator names, are represented by fewer characters in binary encoding than in the ASCII encoding. Binary encoding is generally used in environments in which communication bandwidth or storage space is minimal. Communication media such as Appletalk and Ethertalk support the binary protocol. A program, such as a web browser, uses the binary information coded within it to analyze an HTML ASCII file and translate that information into a visual web page. Pictures and program-specific files, such as a Photoshop document, are also considered to be binary files. The process of converting data into binary code is called an encoding.


  • ASCII :

ASCII stands for American Standard Code for Information Interchange. A coded character set consisting of 128 7-bit characters. There are 32 control characters, 94 graphic characters, the space character, and the delete character. The ASCII protocol is made up of data that is encoded in ASCII values with minimal control codes added. The control codes that are added are interpreted by the printer. Parallel, Serial, and Ethernet medium all support ASCII communication and consider it to be the standard. All computer files are comprised of tiny pieces of information, called bits. In an ASCII file, each byte directly correlates to a specific character as defined by the standard ASCII code. A common example of an ASCII file is a text document created without any formatting, such as font styles or paragraph indentations. An ASCII file is a binary file that stores ASCII codes. There are 128 different ASCII codes; this means that only 7 bits are needed to represent an ASCII character. So in any ASCII file, you’re wasting 1/8 of the bits. In particular, the most significant bit of each byte is not being used. A full, general binary file has no such restrictions. Any of the 256-bit patterns can be used in any byte of a binary file. ASCII files are used for simple word editing, but they are also the basis for all web pages. HTML is written in ASCII because each character has a specific and unique meaning that can be easily read by web browsers.


What is Algorithm and It's complexity 

An algorithm is a procedure for solving a problem in terms of the actions to be executed and the order in which those actions are to be executed. An algorithm is merely the sequence of steps taken to solve a problem. The steps are normally "sequence," "selection, " "iteration," and a case-type statement. In C, "sequence statements" are imperatives. The "selection" is the "if then else" statement, and the iteration is satisfied by a number of statements, such as the "while," " do," and the "for," while the case-type statement is satisfied by the "switch" statement. An algorithm is a specific procedure for solving a well-defined computational problem. The development and analysis of algorithms is fundamental to all aspects of computer science: artificial intelligence, databases, graphics, networking, operating systems, security, and so on. Algorithm development is more than just programming. It requires an understanding of the alternatives available for solving a computational problem, including the hardware, networking, programming language, and performance constraints that accompany any particular solution. It also requires understanding what it means for an algorithm to be “correct” in the sense that it fully and efficiently solves the problem at hand.

The  complexity of an algorithm is a measure of the amount of computing resources (time and space) that a particular algorithm consumes when it runs. Computer scientists use mathematical measures of complexity that allow them to predict, before writing the code, how fast an algorithm will run and how much memory it will require. Such predictions are important guides for programmers implementing and selecting algorithms for real-world applications.


Pseudocode

Pseudocode is an artificial and informal language that helps programmers develop algorithms. Pseudocode is a "text-based" detail (algorithmic) design tool.

The rules of Pseudocode are reasonably straightforward. All statements showing "dependency" are to be indented. These include while, do, for, if, switch. Examples below will illustrate this notion.


• Pseudocode is understood by the programmers of all types.

• it enables the programmer to concentrate only on the algorithm part of the code development.

• It cannot be compiled into an executable program. Example, Java code : if (i < 10) { i++; } pseudocode :if i is less than 10, increment i by 1



Storing Data in Memory

Computer data storage is a complex subject, but it can be broken down into three basic processes. First, data is converted to simple numbers that are easy for a computer to store. Second, the numbers are recorded by hardware inside the computer. Third, the numbers are organized, moved to temporary storage and manipulated by programs, or software.

Every piece of data in a computer is stored as a number. For example, letters are converted to numbers, and photographs are converted to a large set of numbers that indicate the color and brightness of each pixel. The numbers are then converted to binary numbers. Conventional numbers use ten digits, from 0-9, to represent all possible values. Binary numbers use two digits, 0 and 1, to represent all possible values. The numbers 0 through 8 look like this as binary numbers: 0, 1, 10, 11, 100, 101, 110, 111, 1000. Binary numbers are very long, but with binary numbers any value can be stored as a series of items which are true (1) or false (0), such as North/South, Charged/Uncharged, or Light/Dark.


Data types to store data

Data types :

The simple data types in the platform are:

  • integer
  • decimal
  • text

There are four simple data types that represent how information is internally stored in the 1010data Insights Platform.

  1.  The integer data type is often used to hold information like transaction IDs and store numbers. Integers are also used to represent date or time values, using the date, month, quarter, and time forms. For instance, the date 12/10/2013 is stored as the integer 20131210. The time 10:25:30 is stored as the integer 102530.                                                                                                                                The big integer data type supports whole number values that exceed the range that is supported by the integer data type. Most commonly, big integer columns are used in links, selections, and tabulations, since data such as keys and IDs are often stored in columns of this type.
  2. The decimal data type may contain values such as sales prices, unemployment rates, interest rates, and floating-point values. In a decimal data type can also hold a value that contains a combination of date and time information.
  3. The text data type is used for alphanumeric values that may include symbols, and spaces, such as customer IDs, product names, sizes, ZIP codes, or geographic locations.

Comments

Popular posts from this blog

Blockchain Technology