Page 67 - PlugGPT_V2.0_C7_Flipbook
P. 67

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


                    ASCII is made up of 128 symbols in the character set. These symbols consist of letters (both
                    uppercase  and lowercase),  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

                 The program executes the statements written inside the               Start
                 IF block when the condition is True. If the condition is
                 False, the statements written inside the else block will be
                 executed. A block refers to a section
                                                                                  IF (Condition)
                 of code that is grouped together.               True             to be checked           False


                                                             Statements inside IF              Statements inside ELSE
                                                              block will execute                  block will execute




                                                                                      Stop



                                                                                        Algorithmic Intelligence     65
   62   63   64   65   66   67   68   69   70   71   72