Computer Science - 9210 OxfordAQA

Data Types

Gbogbo ọrọ náà

Everything inside a computer is a pattern of bits, and a pattern of bits on its own means nothing whatever. The same eight bits, 01000001, are the number 65, the letter A, one pixel of a photograph and part of a machine instruction, depending entirely on what the machine has been told the pattern is for. That instruction is the data type, and without it a computer cannot tell an amount of money from a name.

This lesson covers the five types the specification names: integer, real, Boolean, character and string. You will learn what each one holds, what operations each one supports, and how to choose between them for a given piece of information, which is the form the exam question almost always takes. You will also learn two distinctions that catch people out every year: why a whole number stored as a real is not the same thing as an integer, and why a telephone number is a string.

Ebumnobi

  1. Understand the concept of a data type.
  2. Understand and use the following appropriately:
  3. integer
  4. real
  5. Boolean
  6. character
  7. string.

Maapụ uche

E seela isiokwu a ka ị hụ otu echiche si ejikọta.

Mepee maapụ uche na ngwa

Akwụkwọ Ọmụmụ

Suppose a program holds the two characters 5 and 0 typed by a user. Should adding 1 give 51 or should it give the string 501? Both are defensible and they cannot both happen, so something has to decide. That something is the data type: a label attached to a value that says what kind of thing it is, which values are legal for it, and which operations are allowed on it.

Ndetu Nkuzi Zuru Ezu di na Ngwa Green Bridge

Nweta ngwa Green Bridge CBT na ekwenti gi ma o bu kompiuta maka ulo akwukwo IGCSE zuru oke: akwukwo ule ndi gara aga, usoro nyocha, eserese uche, kaadi omumu na nkuzi olu.

Akwụkwọ ndụmọdụ zuru oke nwere eserese
Onye inyeaka mmụta AI
Ule nnwale nwere oge a na-ahazi ozugbo i mechara
Ọ dị na Android, Windows, macOS, na Linux Ngwa iOS na-abia n'oge na-adighi anya

Nnyocha Ọmụmụ

Ekele diri gi maka imecha ihe karịrị na Data Types. Ugbu a na ị na-enyochakwa isi echiche na echiche ndị dị mkpa, ọ bụ oge iji nwalee ihe ị ma. Ngwa a na-enye ụdị ajụjụ ọmụmụ dị iche iche emebere iji kwado nghọta gị wee nyere gị aka ịmata otú ị ghọtara ihe ndị a kụziri.

Ị ga-ahụ ngwakọta nke ụdị ajụjụ dị iche iche, gụnyere ajụjụ chọrọ ịhọrọ otu n’ime ọtụtụ azịza, ajụjụ chọrọ mkpirisi azịza, na ajụjụ ede ede. A na-arụpụta ajụjụ ọ bụla nke ọma iji nwalee akụkụ dị iche iche nke ihe ọmụma gị na nkà nke ịtụgharị uche.

Jiri akụkụ a nke nyocha ka ohere iji kụziere ihe ị matara banyere isiokwu ahụ ma chọpụta ebe ọ bụla ị nwere ike ịchọ ọmụmụ ihe ọzọ. Ekwela ka nsogbu ọ bụla ị na-eche ihu mee ka ị daa mba; kama, lee ha anya dị ka ohere maka ịzụlite onwe gị na imeziwanye.

  1. Which data type should be used to store whether a light is switched on? A. Boolean B. Character C. Integer D. String Answer: A
  2. Which value could be stored in a variable of type integer? A. 4.0 B. -17 C. False D. seventeen Answer: B
  3. A postcode such as 0X4 2AB is to be stored. Which is the most appropriate data type? A. Boolean B. Character C. Integer D. String Answer: D
  4. Which statement about the character type and the string type is correct? A. A character can hold any number of symbols B. A string must contain at least one character C. A character holds exactly one symbol and a string holds any number D. Characters and strings are stored identically in all languages Answer: C
  5. A program reads 8 and 3 from the keyboard and outputs 83 instead of 11. What is the most likely cause? A. The values were stored as strings and joined rather than added B. The values were stored as Booleans C. Whole-number division was used D. The variables were declared as reals Answer: A

Rue ajuju ndi a n'ime ngwa ahu

Rue ajuju ndi a n'ime ngwa ahu

Meecha Ajụjụ Ule Ọmarịcha

Ị chọrọ ime ajụjụ ule ọmarịcha gbasara Data Types? Budata ngwa Green Bridge CBT iji nweta ajụjụ ule ọmarịcha na nyocha zuru ezu gbasara isiokwu a.

Budata Ngwa Ahụ Na Google Playstore

Ihe nile ichoro iji nwee ihe ịga nke ọma na JAMB, WAEC & NECO.

Green Bridge CBT Mobile App
Onye Enyemaka Nkata AI Nke Ọmụmụ Ihe Ahaziri Maka Gị
Ajụjụ ule IGCSE, JAMB, WAEC na NECO karịrị 200,000
Ihe karịrị 1200 Nkọwa Nkuzi
Nkwado Na-enweghị Ịntanetị - Mụọ Ihe Mgbe Ọ Bụla, Ebe Ọ Bụla
Jadawalin Gada Kore
Akọkọ akọle iwe & Ibeere agbara
Sọfụma Ọrụ Gi & Ọganihu Gi
Nkọwa Miri Emi Maka Ọmụmụ Ihe Zuru Ezu