Posts

Basic calculator program using Python  # pip install tkinter import tkinter as tk import tkinter.messagebox from tkinter.constants import SUNKEN window = tk.Tk() window.title('Calculator-GeeksForGeeks') frame = tk.Frame(master=window, bg="skyblue", padx=10) frame.pack() entry = tk.Entry(master=frame, relief=SUNKEN, borderwidth=3, width=30) entry.grid(row=0, column=0, columnspan=3, ipady=2, pady=2) def myclick(number): entry.insert(tk.END, number) def equal(): try: y = str(eval(entry.get())) entry.delete(0, tk.END) entry.insert(0, y) except: tkinter.messagebox.showinfo("Error", "Syntax Error") def clear(): entry.delete(0, tk.END) button_1 = tk.Button(master=frame, text='1', padx=15, pady=5, width=3, command=lambda: myclick(1)) button_1.grid(row=1, column=0, pady=2) button_2 = tk.Button(master=frame, text='2', padx=15, pady=5, width=3, command=lambda: myclick(2)) button_2.grid(row=1, column=1, pady=2) b
Image
   C entral processing unit A central processing unit, also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and input/output operations specified by the instructions in the program.   Description एक सेंट्रल प्रोसेसिंग यूनिट बुनियादी गणित, तार्किक, नियंत्रण और इनपुट / आउटपुट के संचालन के निर्देश के द्वारा निर्दिष्ट प्रदर्शन से एक कंप्यूटर प्रोग्राम के निर्देशों से बाहर किया जाता है कि एक कंप्यूटर के भीतर इलेक्ट्रॉनिक विद्युत्-परिपथ तंत्र है।  
  What is a computer? A computer is a device that accepts information (in the form of digitalized data) and manipulates it for some result based on a program, software, or sequence of instructions on how the data is to be processed.
                  What is an instruction set? An instruction set is a group of commands for a central processing unit ( CPU ) in machine language. The term can refer to all possible instructions for a CPU or a subset of  instructions  to enhance its performance in certain situations. All CPUs have instruction sets that enable  commands  directing the CPU to switch the relevant transistors. The instructions tell the CPU to perform tasks. Some instructions are simple read, write and move commands that direct data to different hardware elements. The instructions are made up of a specific number of  bits . For instance, The CPU's instructions might be 8 bits, where the first 4 bits make up the operation code that tells the computer what to do. The next 4 bits are the operand, which tells the computer the data that should be used. The length of an instruction set can vary from as few as 4 bits to many hundreds. Different instructions in some instruction set architectures (ISAs) have di
                                     Whats is a computer? A computer is  an electronic device that manipulates information, or data . It has the ability to store, retrieve, and process data. You may already know that you can use a computer to type documents, send email, play games, and browse the Web.
Image
                                Computer architecture   Block diagram of a basic computer with uniprocessor CPU. Black lines indicate data flow, whereas red lines indicate control flow. Arrows indicate the direction of flow. In  computer engineering ,  computer architecture  is a description of the structure of a  computer  system made from component parts. It can sometimes be a high-level description that ignores details of the implementation. At a more detailed level, the description may include the  instruction set architecture  design,  microarchitecture  design,  logic design , and  implementation . [3] History The first documented computer architecture was in the correspondence between  Charles Babbage  and  Ada Lovelace , describing the  analytical engine . When building the computer  Z1  in 1936,  Konrad Zuse  described in two patent applications for his future projects that machine instructions could be stored in the same storage used for data, i.e., the  stored-program  conc
                                           Computer Register Computer registers are high-speed memory storing units. It is an element of the computer processor. Ot can carry any type of information including a bit swquence or single data.  A register should be 32 bits in length for a 32-bit instruction computer. Registers can be numbered relies upon the processor design and language rules. The instructions in a computer are saved in memory locations and implemented one agter another at a time. The function of the control unit is to fetch the instructions from the memory and implement it. The control does the similar for all the instructions in the memoru in sequential order.  A counter is needed to maintain a path os the next instruction to be implemented and evaluate its address. The figure shows the registers with their memories. The memory addresses are saved in multipe registers. These requirements certainly state the use for registers inscomputer.