The Question-and-Answer Computator    
     Created by David Alderoty, ©2015    
    To contact the author use: David@TechForText.com Or left click for a website communication form    
    SECTION 1, INTRODUCTION:  The Question-and-Answer Computator is a software-based device that carries out logical computations with words.  Specifically, the device provides answers to 12 questions, based on the words entered by the user.  Five of these questions involve time calculations, and thus the answers are constantly changing with the passage of time. (The online version of this device, is displayed on this webpage, approximately 3 or 4 screen lengths, below these words.)    
          The Question-and-Answer Computator, was created for demonstration and experimental purposes, in the Microsoft Excel format, and for online functionality in JavaScript.  However, software that operates with the basic concepts demonstrated by The Question-and-Answer Computator, can be created with almost any modern programming language.      
          The Question-and-Answer Computator, is based on a set of formulas that were created with the Excel’s IF( ) function.  The questions entered by the user are transmitted to each formula, which checks to see if it has the answer.  If it has the answer, it transmits it to a display box.  The formulas essentially work by evaluating the equality of the words in an adjoining cell, with the words entered by the user. If the words are the same, the formula transmits the answer to the display box.     
          For example, with the formula =IF(Q=J48, L48,""), Q represents the input box with a question entered by the user.  J48 is a cell that contains a question, which is compared with the question entered by the user.  If the questions in Q and J48 are the same, the formula displays the answer, which in this case is stored in cell L48    
          The above is a simplified explanation, and the actual mechanism has more formulas, and components.  However the Question-and-Answer Computator  is very easy to use.    
          If you are interested in a detailed discussion of how the Question-and-Answer Computator, was created, and how its internal mechanism functions, see sections 3, 4, and 5, on this webpage.  If you are an expert Microsoft Excel user, or have expertise in a specific computer language, you will probably be able to create a device similar to the Question-and-Answer Computator, with the information provided in these sections.    
    The Question-and-Answer Computator is available in an HTML-JavaScript version, online at www.TechForText.com/LG      
    The Question-and-Answer Computator, is also available in the Microsoft Excel format at www.TechForText.com/LG/QAComputator.xlsx    
    SECTION 2, INSTRUCTIONS:  Enter one or more of the questions on this list, into the brown or pink input boxes, presented below.     
    What time is it? Who discovered America? When was the first mobile telephone created?    
    What is the current date? Who was the first president of the United States? Where is the tallest building in the world?    
    What year is it? Who invented the computer? Who is the tallest person that ever lived?    
    What is the last day of this month?" Who invented the ELECTRONIC DIGITAL computer? How long ago, was this software created, in hours, minutes, and seconds?    
             
      To use the Question-and-Answer Computator, enter one of the questions from the list, presented above.  Then, left click with the mouse on the background, or press the enter key.  To enter or delete words in this software, first left click with the mouse on the input box.    
          There are two input boxes in this software, one is pink, and the other is brown.  Both of these input boxes serve identical functions, but the pink one has a pulldown menu, to select the question you want.      
          With the Brown input box, you must type in your question, or use the cut and copy function to enter your question.  You can copy your question from the list at the beginning of this section.  When using the brown input box, you must enter the question exactly as it is presented in the list, without any extra spaces.  However, this software is not case-sensitive, and thus you can use upper or lower case letters.  If you enter a question in the brown input box, and the software does not respond to it, there is probably some extra space on the left or right of the phrase.              
         To use the pink input box, with the online version of the Question-and-Answer Computator, simply left click with the mouse, on the input box, and the menu will appear.  Select the question you want from the menu, and click on it with the mouse.      
          When using the Question-and-Answer Computator, in the Excel format, left click on the pink input box, and you will see a small silver button appear on the right side of the box.  Then, left click on the small silver button, and a menu will open.  Then scroll up or down the menu to find the phrase you want, and left click on the phrase with the mouse, or press the enter key, while the phrase is highlighted.     
          Note, when using the menu, you will see that each question has a number.  If you click on a number, it will be displayed in the pink input box, but the software will not process your question.  Thus, you should only click on the phrases.    
          You can also use both the brown and pink input boxes simultaneously.  This works well, only when you are entering a question that involves a time calculation, and another question that does not involve any calculations.  When the above is not the case, the answers from two questions might be displayed as a single block of confusing text.    
          Below the pink input box, there is a display box, where the answers to the questions are presented.  The display box is comprised of two yellow sections, and one white section.  The yellow sections are used to display answers to time related questions, such as:  How long ago, was this software created, in hours, minutes, and seconds?  The white section is used to display answers to questions that do not involve any type of calculation, such as: Who invented the computer?     
    Input Box, to Enter Questions, with a Drop-Down Menu     
   
   
    Display Box, for Displaying the Answers to the Questions    
           
       
       
             
       
       
       
       
       
    Display Box, for Displaying the Answers to the Questions    
     Input Box, to Enter Questions      
       
    SECTION 3, THE FORMULAS, AND RELATED COMPONENTS, USED TO CREATE THE QUESTION-AND-ANSWER COMPUTATOR: The following sections provide some information on the internal structure and functioning of the Question-and-Answer Computator.  This information is based on the device that was created in the Microsoft Excel format.  All of the formulas and components of the device are not discussed in detail in the following sections.  If you want detailed information, you should download a special version of the Question-and-Answer Computator.  This version has all of the formulas exposed, because it is for study purposes, and it does not perform the computations.  To download left click on the following link:    
    www.TechForText.com/LG/StudyQ-A-Computator.xlsx    
          The Question-and-Answer Computator, was originally created with Microsoft Excel, with a set of formulas I devised.   Many of the formulas were created with the IF() and OR( ) functions, =, “ ” and related cell designations.  These formulas determine if the question entered in an input box, matches the answer that is governed by a specific formula.  That is each of the formulas with the IF() function, evaluates a question, entered into the input box by the user.  If a specific formula has access to the answer, it creates a switch like connection from the storage cell, and transmits the answer to the display box.      
          The display box is comprised of two yellow sections, and one white section.  The yellow section is used to display time related calculations.  The yellow sections are have formulas and format code to process the data into a conventional time format.  The white section contains a special formula, that I created to display text transmitted from several formulas.  This formula is comprised of cell designations, connected together with &, and it is displayed below:
                                     =K70&K72&K74&K76&K78&K80&K82 
   
          Most of the formulas that comprise the question-and-answer computator, are presented below, in the center, which is column K.  The actual formulas are not visible, but there are equivalent formulas displayed in red type.     
       
      The Time is    
    ="What time is it?" =IF(OR(Q=J38, X=J38), L38,"") =NOW()    
       
      Today is    
    ="What is the current date?" =IF(OR(Q=J40, X=J40), L40, "") =TODAY()    
       
      The year is    
    ="What year is it?" =IF(OR(Q=J40, X=J40), L40,"") =TODAY()    
       
      Last day of the month is    
    ="What is the last day of this month?" =IF(OR(Q=J44, X=J44), L44,"") =TODAY()    
    Who discovered America?  America was originally discovered by the American Indians and at a later point in time by the Vikings.  Christopher Columbus discovered America many years after the Indians and Vikings discovered it.    
    =IF(OR(Q=J46, X=J46), L46,"") Who discovered America?  America was originally discovered by the American Indians and at a later point in time by the Vikings.  Christopher Columbus discovered America many years after the Indians and Vikings discovered it.    
    Who was the first president of the United States?  George Washington is the first president of the United States.  However, a few sources argue that John Hanson was the first president.  See the following:  http://www.marshallhall.org/hanson.html  and  www.constitutionfacts.com/us-articles-of-confederation/john-hanson-story    
    ="Who was the first president of the United States?" =IF(OR(Q=J59, X=J59), L59,"") Who was the first president of the United States?  George Washington is the first president of the United States.  However, a few sources argue that John Hanson was the first president.  See the following:  http://www.marshallhall.org/hanson.html  and  www.constitutionfacts.com/us-articles-of-confederation/john-hanson-story    
    Who invented the computer?  Many sources attribute the invention of the computer to Charles Babbage.  However, he designed a MECHANICAL DEVICE, which was never built.  Most people would probably not consider his device a true computer.  For more information, see this YouTube video: https://youtu.be/d1pvc9Zh7Tg    
    ="Who invented the computer?"  =IF(OR(Q=J50, X=J50), L50,"") Who invented the computer?  Many sources attribute the invention of the computer to Charles Babbage.  However, he designed a MECHANICAL DEVICE, which was never built.  Most people would probably not consider his device a true computer.  For more information, see this YouTube video: https://youtu.be/d1pvc9Zh7Tg    
    Who invented the ELECTRONIC DIGITAL COMPUTER?  John Vincent Atanasoff invented the digital electronic computer, according to many sources.  His invention was based on vacuum tubes, but it functioned with binary digits, similar to the modern computer.  For more information, see the following YouTube videos:                                                                                                                                                            https://youtu.be/LDbYyRPEtRs ,   https://youtu.be/Wbl2yZTFZRk
   
    ="Who invented the ELECTRONIC DIGITAL computer?" =IF(OR(Q=J52, X=J52), L52,"") Who invented the ELECTRONIC DIGITAL COMPUTER?  John Vincent Atanasoff invented the digital electronic computer, according to many sources.  His invention was based on vacuum tubes, but it functioned with binary digits, similar to the modern computer.  For more information, see the following YouTube videos:                                                                                                                                                            https://youtu.be/LDbYyRPEtRs ,   https://youtu.be/Wbl2yZTFZRk
   
    When was the first mobile telephone created?  The answer to this question depends on your definition of a mobile phone.  This is because they were various types of portable telephone devices created many years before the cell phone.  However, most sources, attribute of development of the modern mobile phone to Zachary M. Seward, in the early 1970s.  See the following: http://ademobiles.blogspot.com
 www.cnn.com/2010/TECH/mobile/07/09/cooper.cell.phone.inventor
   
    ="When was the first mobile telephone created?" =IF(OR(Q=J54, X=J54), L54,"") When was the first mobile telephone created?  The answer to this question depends on your definition of a mobile phone.  This is because they were various types of portable telephone devices created many years before the cell phone.  However, most sources, attribute of development of the modern mobile phone to Zachary M. Seward, in the early 1970s.  See the following: http://ademobiles.blogspot.com
 www.cnn.com/2010/TECH/mobile/07/09/cooper.cell.phone.inventor
   
    Where is the tallest building in the world?  Dubai, United Arab Emirates.  The building is the Burj Khalifa, which is 2,722 ft) tall.  See the following: https://www.youtube.com/watch?v=P7lWOkXuO8Q
www.digitaltrends.com/cool-tech/tallest-building-in-the-world
   
    ="Where is the tallest building in the world?" =IF(OR(Q=J56, X=J56), L56,"") Where is the tallest building in the world?  Dubai, United Arab Emirates.  The building is the Burj Khalifa, which is 2,722 ft) tall.  See the following: https://www.youtube.com/watch?v=P7lWOkXuO8Q
www.digitaltrends.com/cool-tech/tallest-building-in-the-world 
   
    Who is the tallest person that ever lived?  In terms of documented cases, Robert Pershing Wadlow, is the tallest individual, with a height slightly over 8 feet, 11 inches.  See the following: http://www.guinnessworldrecords.com/world-records/tallest-man-ever     
    ="Who is the tallest person that ever lived?" =IF(OR(Q=J58, X=J58), L58,"") Who is the tallest person that ever lived?  In terms of documented cases, Robert Pershing Wadlow, is the tallest individual, with a height slightly over 8 feet, 11 inches.  See the following: http://www.guinnessworldrecords.com/world-records/tallest-man-ever     
             
       
    This software was created on November 4, at 2:00 PM.  The age of the software, from the time of completion, to the present point in time, is presented below in red type, in terms of hours, minutes, and seconds.    
       
    SECTION 4, PRACTICAL APPLICATIONS, AND RELATED THEORY OF THE STRUCTURE AND FUNCTIONING OF THE QUESTION-AND-ANSWER COMPUTATOR    
          The formulas that provide answers to the questions are connected in parallel from the input boxes.  This means they are all connected to the same boxes, and in theory, the formulas receive the same request to process a question simultaneously.  Some of the transmission connections from the above formulas to the white section in the display box also involved parallel connections.  This should be obvious from the formula used in the white section of the display box which is =K70&K72&K74&K76&K78&K80&K82.  The configuration described above is very unusual for devices created in Microsoft Excel, but I have used similar configuration successfully, with other devices I created.     
          The general concept, used to create the Question-and-Answer Computator, has potential utility for creating a number of software-based devices.  Two examples are databases with search functions and display boxes, and question and answer devices that can carry out complex calculations.  The concepts are also useful for creating databases that have information that is constantly changing.  The primary concepts that are especially useful, are the novel use of the IF() function, and the design of the display box with the parallel connections to multiple formulas.  There are of course other ways of creating these devices, but the concepts that were discussed above, might be easier, quicker, and more efficient, in many situations.     
    SECTION 5, SPECIAL FORMULAS FOR CALCULATING ELAPSED TIME, TO ANSWER THE QUESTION: HOW LONG AGO, WAS THIS SOFTWARE CREATED, IN HOURS, MINUTES, AND SECONDS?    
    The conventional Microsoft Excel formulas were inadequate for the elapsed time calculation indicated in the above title.  The formulas I devised use only the NOW() function from Excel.  The formulas that I created do not require any special format code, and they clearly indicate the elapsed time in days, hours, minutes, and seconds.  How these formulas were created, is presented below.  Keep in mind that the numbers used to demonstrate the concepts will constantly change, because they are connected to the NOW() function.  The following formulas are also connected to the mechanism of the Question-And-Answer Computator.    
    The start date is on the left, and the start time is on the right.    
       
    The time and date are converted to a number format, consisting of days, and fractions of a day.  Then, the time and date are added together, (formula used =J70+L70).  The resulting number is subtracted from the present date, which indicates the elapsed time from time zero, (formula used =NOW()-K70).  In this situation, times zero means the date and time when the software was created.  The elapsed time is displayed below, in days and fractions of the day.    
    Elapsed Time in Days    
    The following mathematics converts the elapsed time from days, to hours, minutes, and seconds.   The elapsed time is also converted into days, hours, minutes, and seconds, in a second set of calculations.   This software makes these conversions in the same way humans do, but it repeats the calculations  continuously, because the elapsed time is continuously increasing. (Continuously means here, when the software is opened, and when words are entered or deleted.)  If you want to understand the following calculations, just ask yourself how you would convert days to hours, minutes, and seconds.     
    The first step is to convert the elapsed time from days, two hours, by multiplying by 24.  This results in the following (formula used =K72*24 )    
       
    The next step is to separate the whole number, from its decimal.  The whole number represents hours.  The decimal represents fractions of an hour, which will be converted to minutes and seconds.  The following two formulas were used to carry out the above: =ROUNDDOWN(J75,0) and =J75-K77    
    =ROUNDDOWN(J75,0)    
    Formula used for the above, yellow highlighted section =K77&" Hours,"    
    =J75-K77      
     The above is a fraction of an hour, displayed in a decimal. This decimal is  multiplied by 60 below, to converted to minutes.      
             
      Minutes    
    The next step is to separate the whole number, from its decimal.  The whole number represents minutes.  The decimal represents fractions of a minute, which will be converted to seconds.  The following two formulas were used to carry out the above: =ROUNDDOWN(J75,0) and =J75-K77    
             
    =ROUNDDOWN(K82, 0)     
    Formula used for the above, yellow highlighted section is =K85&" Minutes"    
    =K82-K85      
    The above is a fraction of a minute, displayed in a decimal. This decimal is multiplied by 60 below, to converted it to seconds (formula used =K87*60 ).     
             
    =K87*60 Seconds    
    The above, is rounded to two decimal places, with the following formula: =Round(K90,  2 )    
             
    =ROUND(K90, 2)    
    Formula used for the yellow highlighted section is ="and "&K93&" Seconds"    
       
    The formula used for the above, was created by connecting the cell designations that were highlighted in the previous paragraphs, in yellow, as as shown below:  =L77&" "&L85&" "&L93    
    The elapsed time can also be calculated in DAYS, hours, minutes, and seconds.  This can be done by starting with the elapsed time that was presented above, in days, and fractions of a day.    
    Elapsed Time, in days     
    The first step is to separate the decimal from the whole number.  The whole numbers represent days, and the decimal represents a fraction of the day.  This can be achieved with the following formulas.    
    =ROUNDDOWN(K72, 0 ) Days    
    The following formula was used for the yellow highlighted section. =K101&" Days,"    
    K72-K101 =K101&" Days,"    
    The above decimal represents a fraction of a day.  This decimal will be converted to hours by multiplying by 24, with the following formula: ROUNDDOWN(J106,0), and =K103*24    
    hours    
    The next step is to separate the whole number, which represents hours, from the decimal which represents a fraction of an hour.  This can be done with the following formulas:  =ROUNDDOWN(J106,0), and =J106-K108    
    ROUNDDOWN(J106,0)    
    =K108&" Hours,"    
    The above decimal, is of fraction of an hour, which will be converted to minutes, by multiplying by 60, using the following formula =J109*60     
    Minutes    
    The next step is to separate the whole number, which represents minutes, from the decimal, which represents a fraction of a minute.  This can be done with the following formulas:  =ROUNDDOWN(J111,0), and =J106-K108    
    =ROUNDDOWN(J111,0)    
    =J111 -K113 =K113&" Minutes,"    
    The above is a fraction of a minute, and it can be converted to seconds by multiplying by 60, with the following formula: =K114*60    
    Seconds    
    The above number represents seconds, and it is rounded to two decimal places below, with the following formula: ==ROUND( J116,  2)    
    =ROUND( J116,  2)    
    ="and "&K118&" Seconds"    
             
       
    The formula used for the above, was created by connecting the cell designations that were highlighted in the previous paragraphs, in yellow, as as shown below:  =L77&" "&L85&" "&L93    
     I, David Alderoty, created the above software, by devising a set of formulas, and entering them into Microsoft Excel.  Then I converted the resulting Microsoft Excel device into HTML and JavaScript code, so that it can be viewed with conventional web browsers.  The conversion was carried out electronically, with a software program called SpreadsheetConverter.  After, the conversion, I had to edit the resulting code, to improve the appearance and functionality of the webpage and the above software.  For information on SpreadsheetConverter see the following:    
       
       
    www.SpreadsheetConverter.com     
   
   
    www.SpreadsheetConverter.com/download/end-user-license-agreement