Page 96 - TP_Play_V2.1_class7
P. 96

Binary Representation of Information

                  Binary code is the most basic form of data that a computer can directly interpret. Computers
                  use binary code, composed of 1s and 0s, to store and process data. These 1s and 0s represent
                  electrical signals: ON for 1 and OFF for 0. For instance, the number 5 is stored as 0101 in binary.
                  Binary numbers can also represent text characters through the American Standard Code for
                  Information Interchange (ASCII). For example, the binary code for the ASCII uppercase letter ‘A’
                  is 1000001.


                    Clickipedia                                             Monarch butterflies migrate thousands

                                                                             of miles by using environmental cues
                     ASCII is made up of 128 symbols  in the                   and internal compasses, similar to
                     character  set.  These symbols consist of              navigation algorithms that use data and
                     letters (both uppercase and lowercase),
                                                                                  maps to find optimal routes.
                     numbers, punctuation marks, special
                     characters and control characters.


                           Tech Funda



                         Look at these binary codes of numbers 1-10.
                                   Number            Binary                    Number            Binary
                                       1              0001                         6              0110
                                       2              0010                         7              0111
                                       3              0011                         8              1000
                                       4              0100                         9              1001
                                       5              0101                        10              1010





                      CONDITIONS IN A PROGRAM

                  While writing a program, we need to make certain decisions based on the logic of the program.
                  Such situations are called conditions. Conditional statements are used in a program to instruct
                  the computer to make a decision. The result of a condition will always be either True or False.

                  if-then-else                                                         Start

                  The program executes the statements written inside the
                  IF block when the condition is True. If the condition is
                                                                                   IF (Condition)
                  False, the statements written inside             True            to be checked             False

                  the else block will be executed.  A
                                                              Statements inside IF               Statements inside ELSE
                  block refers to a section of code that       block will execute                  block will execute
                  is grouped together.


                                                                                       Stop


                   94       Play (Ver. 2.1)-VII
   91   92   93   94   95   96   97   98   99   100   101