Posts

Post Correspondance Problem(PCP)

To prove a program or normal thing(strings or languages) undecidable or decidable there are some technology. The technology is based on a very simple model of a computer called the Turing Machine. The Post Correspondence Problem is an undecidable problem that turns out to be a very helpful tool for proving problems in logic or in formal language theory to be undecidable. What is undecidable? The, specific, problem that cannot be solved using a computer are called undecidable. In computing there always exist some. That is a program and an input, whether the program will finish running or continue to run forever. Suppose, we have step by step procedure(Algorithm) to solve a particular problem. We give the input(problem) and if that procedure can solve it, it gives the result true and if it not it give the result false. what if we give that procedure input(problem)which run forever that it take very long  time(years) to get the result(TRUE or FALSE), then we can't make the dec...

Interrupts

Interrupt can be termed as signal send by the hardware to processor. The signal tells that hardware is ready. When an interrupt signal comes, the processor stops or suspend what it is doing and give attention to the signal. Processor is the central unit of a computer. Computer consist number of devices, input/output devices. Every devices are controlled and monitored by CPU. This is done by checking the status of every devices attached. For instance, CPU checks the status of the keyboard, printer, monitor to see if it is ready or not. Ready means if the user is typing, keyboard is ready and CPU give attention to device and if the user wants to print some thing CPU checks the status of the printer. If it is ready then execute some routine to perform the printing task.But the typing

Visual Basic 6: Using Microsoft DataGrid Control 6.0

DataGrid control is   which is not  available by default in Tool box of Vb. You can add it from by Selecting menu Project ->Component. From there select Microsoft DataGrid Control 6.0 and check check box to add it to Tool box. Before exiting from there, select the Microsoft ADO data control to access the database. Now you can drag and drop both conreol as other normal controls.  To create a Database one can use MS Access. After creating the DB use ADO control to connect the DB with the VB application Click--> Visual Basic 6.0:Using Microsoft DataGrid Control 6.0

Combobox and click event in Visual Basic 6.0

Image
Using VisualBasic I am creating a small application program. In this app contains a Text box, a combo-box and a list box. The app accept a number, through text-box, as a limit and by choosing an item (Factorial,Fibonacci,Prime) from the combo-box generate a list in the list box. For example if you feed 5 then choosing factorial from combo box will generate a series in the list box. Normally you do insert code into the combo-box control by double clicking on it . It will by default shows an event-procedure like Sub Combo1_Change(). This means that by default combo-box generate an change event. But this change event is not going to show the result in list box. To show the result of selected item into the list box just change the event _Change to _Click which usually do by selecting the combo on the top of the code window Sub Combo1_Change() 'code goes here end sub to Sub Comb1_Click() 'code goes here End sub. Example: This application has text box, combobox and...

Creating Code modules in Visual Basic

Image
Three VisualBasic(VB) Modules are: Form module Standard module Class module In Visual Basic, a module is a part or a piece of code which, used to, perform some specific task . Modules is a  separate code file. In VB, for application development programmer normally insert code for application by double clicking on controls in desing mode. This action transfer the programmer from design window mode to code-window. The code usually contains declarations of variables, constants, types, procedures, functions event procedures etc etc. Visual Basic usually handles this as module for the form. By using VB module one can create common code for an entire application. Modules are helpful when programmer developing a large application which possibly involve the usage of same code at different part such as procedure,function. For instance a larger

Linker and Loader

Image
Linker Linker is a program whose task is linking various modules in a software. Usually programs are written in line by line. But, programs for large applications writing line by line is not a good idea. Developers divides the programs into various module. combining these modules gives the result. Developers write the code(source code) for each module. These code are compiled to get object files. So there are multiple source code and multiple object files. Here comes the benefit of linker. Linker combine all the object files which are compiled from source code and convert into final executable file/program.     Sometime in linking of object files may include library files. All these files, object files library files combines into a single executable file sometime it can be an object file or library file. Loader Loader is a program whose task is to load programs. Normally, loader is a part of Operating System (OS). The task involves locating the program...

Assembler and Compiler

Assembler and Compiler Programming languages are used to develop software. Depending on the problem programmer can select any programming language he/she wishes. What a programming language actually do? Computer can understand only 0s and 1s (binary digits 0=off,1=on) which is known as machine language. To develop software we must interact with computer in the language it knows. But using the machine language to interact with is a very very difficult. In early time programmer use a language to interact with computer to make computer to do a specific job. It is mainly in numerical format[to represent certain task such as addition,multiplication,logical operations etc each of them represented by sequence of number (either binary format or decimal format)]. It too become very hard. Because how many numbers can one remember for a specific task. So we need some solution for that. To interact with computer or make it understand what we are going to instruct it. The choice is to select...