How Computers Work- MidTerm Coursework copy
How Computers Work- MidTerm Coursework copy
Chosen Applica:on:
WhatsApp is a mobile applica0on IO use to communicate with family, friends and colleges in the past week.
Data representa:on:
WhatsApp is a mobile applica0on which make communica0on across a variety of media types, including text,
images, audios and videos. Each type of data is processed, displayed and transmiAed using encoding techniques that
enables seamless communica0on. At the highest level of abstrac0on users see text, images and videos in a screen. At
the lowest level, all data is represented as binary code and travels between client devices and servers over physical
connec0ons (such as Ethernet or fiber) or wireless networks (e.g. Wi-Fi or cellular).
Text messages are the main features of WhatsApp. Characters such as leAers, numbers and symbols are
encoded using ASCII or Unicode standards. Each character is represented by a unique numeric value, which is then
translated into binary code. For example: “The leAer C is represented by the number 67 in ASCII”. Each character
occupies 1 byte (8 bits), so a five words, such as “Hello” requires 40-bit (5 bytes) if binary data. WhatsApp also supports
emojis and languages that use non-La0n alphabets, encoding to handle a huge range of characters.
With WhatsApp, users can also send and receive photos. This is usually compressed to reduce the file size and
secure faster transmission. Images are represented as pixel grid, and each pixel contains informa0on about its colour.
Grayscale images use 8 bit per pixel, while the colour images use 24 bits (3 byte) per pixel to represent RGB values. For
a standard image of 400x400 pixels, the raw data would be 480,000 bytes (480KB) to compression. Compression
algorithms such at JPEG are used to remove redundant informa0on to reduce file size for efficient storage and
transmission.
Videos are integral part of WhatsApp, combining visual and audio data into a unified format. Videos are made
up of individual frames (images) displayed in rapid succession, typically at 30 frames per second (fps). Each frame is
treated in the same way as sta0c image, and pixels are converted to binary. The sound is capture though a microphone
as a change in air pressure, converted to an electrical signal, and digi0zed into binary code. Videos are compressed
using codecs such as H.264 or HEVC to reduce file size while maintaining quality.
Voice messaging and calls rely on audio data captured through the microphone. Sound waves are converted
into digital signals using sampling techniques. The resul0ng binary data is compressed using audio codecs to ensure
efficient transmission without no0ceable quality loss. WhatsApp uses advanced encoding, compression and
transmission technologies to enable the efficient exchange of text, images, audio and videos even over slow or
unreliable networks.
Computer Architecture:
The hardware that I used to access WhatsApp is iPhone, while other people use a variety of smartphones that
has network interfaces. Smartphones like iPhone have similar components to tradi0onal computers, including a CPU
and RAM and a massive storage. The CPU is the core of the device and is responsible for carrying out instruc0ons and
performing calcula0ons. TAM temporarily contains data and instruc0ons necessary to launch applica0ons. SSD
provides long-term storage for the app data, mul0media files and cached informa0on.
When WhatsApp is opened, the applica0on and its data are loaded from the SSD to RAM, according to the
stored program concept. Th CPU processed the applica0on’s tasks using the fetch-execute cycle. Instruc0ons are
encoded in binary format, typically consists of 4 bits for the opera0on code, specifying what ac0on to perform, 12 bits
for the operands, which define the data or memory loca0ons involved. Ager each instruc0on is executed, the program
counter advances to fetch the next instruc0on in sequence.
WhatsApp is a downloadable applica0on available on major plaiorms such as Apple App Store and Google
Play Store. The app’s core is an executable code file that integrates with the opera0ng system using code libraries that
enable advance func0onality. These libraries allow WhatsApp to interact with the device’s hardware and OS features,
while interface libraries manage the display of interac0ve elements, such at buAons, chat windows, and menus.
Addi0onally, resource files such as icons, fonts, and anima0ons help improve the user experience.
In addi0on to mobile apps, WhatsApp offers a web version that can be accessed from a desktop browser. This
version operates using pre-designed template pages that create the layout for features such as chat list, message
threads and media previews. These templates include placeholders that are dynamically filled with user-specific data,
such as contact names or recent messages, retrieved from WhatsApp’s backend databases. The web server merges the
templates with user data and delivers fully-rendered pages to the browser.
I primarily use an iPhone, running Apple’s iOS to access WhatsApp. iOS is built on a Unix-based kernel called
XNU and offers the founda0on for apps like WhatsApp to func0on smoothly. The opera0ng system provides a Graphical
User Interface that supports WhatsApp’s interac0ve design, displaying chats, buAons and mul0media features.
WhatsApp relies on iOS’s memory management system for effec0ve startup. The app allocates temporary
memory (RAM) for processing real-0me tasks like sending messages, displaying media, etc. When handling files, such
as photos or videos, WhatsApp stores them temporarily in memory before saving them to the device’s permanent
storage system.
WhatsApp uses your phone’s network adapter to send and receive data over the internet. This process involves
a variety of devices, including physical and wireless connec0ons, as well as routers and computers. Routers play a vital
role in the internet infrastructure by linking different networks and transla0ng data packets across protocols. Physical
connec0ons, such as Ethernet cables and op0cal fibers provide a wired means of transmission, while wireless
connec0ons use electromagne0c waves like cellular data and Wi-Fi. Users typically access WhatsApp via Wi-Fi in
homes, workplaces or public areas, but cellular data serves as a backup when wi-Fi is unavailable.
When WhatsApp transmits data, it is divided into layers of packets for seamless transfer. For example, binary
data, such as text messages or media files, is encapsulated in an applica0on layer, which contains app-specific
informa0on. This is further wrapped in a transport layer, usually using the Transmission Control Protocol (TCP) for its
reliability, which is then wrapped in the network IP Layer, which is assigned an IP address so that the data can be routed
to the correct des0na0on. The final layer, called the link layer, controls the actual transmission over networks like Wi-
Fi or cellular systems. Once the data arrives at its des0na0on, these layers are removed one by one, allowing the server
to extract and process basic informa0on before sending updates or responses back to the client device.
To protect communica0ons, WhatsApp uses advanced security protocols. Accounts are protected by strict
password policies and users can enable two factor authen0ca0on for an addi0onal security layer. Addi0onally,
WhatsApp ensures your privacy with end-to-end encryp0on, which encrypts your messages, calls and shared files so
that they can only be accessed by the intended recipient. This encryp0on prevents unauthorized par0es from
intercep0ng sensi0ve informa0on during transmission. By incorpora0ng these measures WhatsApp remains a safe and
private plaiorm for users across the world.