Punjab Board · New syllabus 2026

9th Class Computer Chapter 2 Notes

Data Representation

Definition

An unsigned integer stores only non-negative values — with bits, the range is to .


A signed integer can also be negative — one bit is used for the sign, leaving fewer bits for magnitude.

Example 1 — range of an unsigned integer

Find the range of an unsigned -byte (-bit) integer.

  1. bytes bits.
  2. Range: to .

Answer: to

Remember

Whole numbers that can never be negative — like a count of items, or a pixel's brightness — are stored as unsigned, since that doubles the largest value the same number of bits can represent.

Definition

A floating-point number stores a value with a fractional part using a sign, an exponent, and a mantissa (similar to scientific notation) — this lets a fixed number of bits represent both very large and very tiny numbers, at the cost of some precision.

Remember

Because only a limited number of bits are available, not every decimal fraction can be stored exactly — this is why floating-point results in real programs sometimes show tiny rounding errors, and why scientific calculations must account for that limitation.

Definition

ASCII (American Standard Code for Information Interchange) uses bits per character, enough for English letters, digits and basic symbols — possible characters.


Unicode uses more bits per character, so it can represent characters from virtually every language in the world, not just English.

Definition

A digital image is made of pixels — tiny dots of colour arranged in a grid.


RGB stands for Red, Green, Blue — the three colour channels combined, at different intensities, to produce every colour a screen displays.

Quick Recap

  • ●Unsigned -bit integer: to . Signed: one bit spent on sign, so a smaller positive range for the same
  • ●Floating-point: sign + exponent + mantissa, trades some precision for a huge range of representable sizes
  • ●ASCII: bits, English-only, characters. Unicode: more bits, virtually every language
  • ●Pixel: one coloured dot of an image. RGB: Red, Green, Blue channels combine to make every colour

Keep going

More 9th Class Computer notes

All 9th Class Computer chapters