Skip to content

MCA · MCA C1001

Introduction to computers: data and computation

Build the foundations: programmable systems, input and output, data representation, encoding, and numerical correctness.

By Dev Kant KumarUpdated 13 Oct 2026

On this page

Before you begin: the foundations you need

This chapter assumes no prior programming experience. You need basic arithmetic and a willingness to trace a sequence of steps. This chapter explains bits, instructions, state, encodings, and data contracts. Processor organisation and performance have their own linked chapters. Read the worked examples rather than memorising definitions in isolation.

The ideas apply to computer-science and computing students internationally. The course and unit labels locate the chapter in this library; they do not change the underlying technical explanations. History and networking are separate chapters within the same unit, not topics you should infer from this introduction.

Four questions to carry through the chapter

  1. Representation: how is a real-world quantity encoded?
  2. Transformation: which operations change that representation?
  3. State: what must the system remember between operations?
  4. Evidence: how can you tell whether the result is correct and the design is suitable?

A calculation is a small example. Suppose you must calculate a percentage. Marks and maximum marks are inputs. Addition and division are transformations. A running total is state. Boundary examples, valid ranges, and an independently calculated result provide evidence. The same questions scale to databases, networks, and distributed applications.

1. What is a computer?

A computer is a programmable system that represents and processes data according to instructions. Most computers we use are electronic and digital: they operate on discrete representations, usually binary values. They can receive inputs, perform arithmetic and logical operations, maintain state, and produce outputs.

The word programmable matters. The same laptop can calculate a result, edit an image, or run a database because its instructions can change. A device that performs one fixed electronic function is not automatically a general-purpose computer. Embedded computers may serve a narrow purpose while still executing software.

A definition is only the starting point. At MCA level, ask: What is being represented? Which instructions operate on it? Where is the state stored? What assumptions make the result meaningful?

2. Input, processing, output, and storage

The input–process–output model describes a task from the user's perspective. Storage allows information to be retained for later use. It is a useful model, not a claim that every computation has exactly four separate physical boxes or follows a single straight path.

Input reaches a processor containing control logic, an ALU and registers. The processor exchanges instructions and working data with main memory and produces output.
A simplified functional view. Persistent storage and device controllers are omitted; real systems have more complex interconnections.

A simplified functional view. Persistent storage and device controllers are omitted; real systems have more complex interconnections.

Worked example: a marks report

  1. Input: a student's identifier and marks, obtained from a form or a file.
  2. Validation: check that marks are numbers within the permitted range and that all required subjects are present.
  3. Processing: calculate the total and percentage using the actual assessment rules.
  4. Output: display a report. A printer or another application could also receive it.
  5. Storage: save a record so it can be retrieved. A displayed result is not necessarily a saved result.

Input is not limited to keyboards, and output is not limited to screens. A sensor supplies input; an actuator receives output. A network interface can both receive and transmit data. A disk operation may read data into a program or write results back to storage.

3. Data, information, and representation

Data is a representation that a system records or processes. Information is the meaning a person or another system obtains by interpreting that data in context. The distinction depends on use: the output of one process can become the input data of another.

The value 75 is ambiguous without context. It might mean a mark, a temperature, or a percentage. Knowing that it is 75 marks out of 100 changes what can be inferred. Units, valid ranges, field names, and data types are part of the interpretation.

Bits do not carry their own meaning

A bit has two possible values. An eight-bit pattern has 256 possible combinations. The pattern 01000001 can denote unsigned integer 65 or, under ASCII, the character A. An encoding or type tells the system how to interpret the pattern. Text, images, and instructions use different interpretation rules.

A byte is eight bits in modern systems. More bits allow more distinct patterns, but do not automatically make the data accurate or useful. A number format may have a limited range or precision. Number systems and overflow are studied in detail in Unit 2.

Accuracy starts before calculation

If a marks program accepts 750 instead of 75, arithmetic may be performed exactly and the report may still be wrong. Check data validity, algorithm correctness, numerical representation, and the rules used to interpret the result. This is the practical meaning of garbage in, garbage out.

Derive the number of representable values

For each bit there are two choices. With two independent bits there are 2 × 2 = 4 patterns: 00, 01, 10, 11. With n bits there are 2 raised to n patterns. If all patterns encode non-negative integers starting at zero, the largest is 2 raised to n minus 1. Eight bits therefore represent unsigned values from 0 through 255.

This is a count of patterns, not a universal rule for every data type. A signed representation allocates patterns differently. A character encoding assigns patterns to symbols or sequences. A floating-point format divides bits into fields with its own interpretation. Never derive a type’s range from the word “byte” alone.

Worked example: interpret one byte

In 01000001, the set bits have place values 64 and 1. The unsigned integer is therefore 65. Under ASCII it represents A. Add one to the integer and you get 66; concatenate the character A with another character and you create a string. Operations depend on meaning, not just on the physical pattern.

Data quality and a usable contract

A contract specifies valid inputs, expected outputs, and behaviour on errors. For a marks calculator, say whether absent marks are allowed, whether fractional marks are valid, whether different subjects have different maxima, and whether rounding occurs only for display. Missing data and zero are not interchangeable.

Check completeness, range, type, consistency, and origin where relevant. A field can be syntactically valid yet wrong: 75 is a permitted mark but may belong to a different student. Validation catches specified invalid cases; it does not establish that every accepted fact is true.

Numerical accuracy and representation limits

Many decimal fractions have no exact finite binary fractional representation. Common floating-point operations therefore use nearby representable values. Rounding the displayed result does not make the stored value exact. A suitable representation and comparison rule depend on the problem.

Do not use approximate arithmetic where the specification requires exact equality without considering alternatives. Integer minor units, decimal arithmetic, and rational arithmetic each have costs and limits. This distinction is part of system correctness, not merely a formatting issue.

Questions and answers

Easy: explain the idea. Medium: apply or compare it. Hard: analyse assumptions and trade-offs. Tags describe the question’s purpose; interview questions are original practice, not claims about a specific employer.

Revision checkpoints

Explain the main mechanisms in your own words, reproduce the worked examples without looking, and answer the tagged questions before expanding their solutions. When an answer depends on assumptions, state them explicitly.

References and further reading

The supplied MCA syllabus defines the topic placement (Fundamentals of Computers, PDF page 9). The chapter explains its prerequisites and worked examples directly; the references support verification and optional further study. The explanations, examples, diagrams, and practice questions here are original teaching material.

Spot an error? Report it to Study Shelf with this page link.