VCE IT Theory Slideshows By Mark Kelly vceit.com Data Types 1 a.

Slides:



Advertisements
Similar presentations
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 2: Data types and addressing modes dr.ir. A.C. Verschueren.
Advertisements

Primitive Data Types There are a number of common objects we encounter and are treated specially by almost any programming language These are called basic.
Constants and Data Types Constants Data Types Reading for this class: L&L,
VCE IT Theory Slideshows By Mark Kelly Vceit.com Naming Conventions for solution elements.
Types and Variables. Computer Programming 2 C++ in one page!
10-Jun-15 Introduction to Primitives. 2 Overview Today we will discuss: The eight primitive types, especially int and double Declaring the types of variables.
©2004 Brooks/Cole Chapter 2 Variables, Values and Operations.
CIS 234: Using Data in Java Thanks to Dr. Ralph D. Westfall.
Chapter 3 Data Representation.
Chapter 3 Data Representation. Chapter goals Describe numbering systems and their use in data representation Compare and contrast various data representation.
8 November Forms and JavaScript. Types of Inputs Radio Buttons (select one of a list) Checkbox (select as many as wanted) Text inputs (user types text)
Data types and variables
Data Representation Kieran Mathieson. Outline Digital constraints Data types Integer Real Character Boolean Memory address.
Chapter 2 Data Types, Declarations, and Displays
String Escape Sequences
VCE IT Theory Slideshows
Storing data Getting data out Data types Ruby as a foundation Program Variables Click icon to hear comments (the download may take a minute)
Objectives You should be able to describe: Data Types
Cosc175/data1 Data comprised of constants and variables information stored in memory Each memory location has an address Address - number identifying a.
Basis Data Terapan Yoannita. SQL Server Data Types Character strings: Data typeDescriptionStorage char(n)Fixed-length character string. Maximum 8,000.
Java Primitives The Smallest Building Blocks of the Language (corresponds with Chapter 2)
Computer Structure & Architecture 7c - Data Representation.
DEPARTMENT OF COMPUTER SCIENCE & TECHNOLOGY FACULTY OF SCIENCE & TECHNOLOGY UNIVERSITY OF UWA WELLASSA 1 CST 221 OBJECT ORIENTED PROGRAMMING(OOP) ( 2 CREDITS.
National Diploma Unit 4 Introduction to Software Development Data types, variables and constants.
Cis303a_chapt03-2a.ppt Range Overflow Fixed length of bits to hold numeric data Can hold a maximum positive number (unsigned) X X X X X X X X X X X X X.
Logical or Boolean Data stored in Boolean form can only be one of two available values. Think of a light switch – it’s on or off. Examples include: YES.
5 BASIC CONCEPTS OF ANY PROGRAMMING LANGUAGE Let’s get started …
Lecture #5 Introduction to C++
Data & Data Types & Simple Math Operation 1 Data and Data Type Standard I/O Simple Math operation.
Primitive Variables.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
IT Applications Theory Slideshows By Mark Kelly Vceit.com Last modified : 6 Dec 2013 Databases II: Structure, naming, data types, data formats.
Primitive Variables.
IT Applications Theory Slideshows Databases II: Structure, Naming, data types, data formats.
Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.
INT213-Week-2 Working with Variables. What is variable
VCE IT Theory Slideshows By Mark Kelly Vceit.com Arrays.
COMP Primitive and Class Types Yi Hong May 14, 2015.
School of Computer Science & Information Technology G6DICP - Lecture 4 Variables, data types & decision making.
Data Tonga Institute of Higher Education. Variables Programs need to remember values.  Example: A program that keeps track of sales needs to remember.
VISUAL C++ PROGRAMMING: CONCEPTS AND PROJECTS Chapter 2A Reading, Processing and Displaying Data (Concepts)
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
Variables in VB. What is a variable? ► A named memory location that stores a value.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
VCE IT Theory Slideshows By Mark Kelly vceit.com Version 2 – updated for 2016 Data Types 1 a.
Data Handling in Algorithms. Activity 1 Starter Task: Quickly complete the sheet 5mins!
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
VCE IT Theory Slideshows by Mark Kelly study design By Mark Kelly, vceit.com, Begin.
Primitive Data Types. int This is the type you are familiar with and have been using Stores an integer value (whole number) between -2,147,483,648 (-2.
© 2006 Lawrenceville Press Slide 1 Chapter 4 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration.
Slide 1 Chapter 3 Variables  A variable is a name for a value stored in memory.  Variables are created using a declaration statement. For example: Dim.
Scalar and composite data Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
MICROSFTACCESS tables. DATA TYPES Field TypeWhat It Holds Short Text Text up to 255 characters long (including spaces and punctuation). Use a Text field,
Data Types Mr Tottman Link. Data Types Programs need to use data for calculations and for output to various devices The best programs will always use.
Chapter 2 Variables and Constants. Objectives Explain the different integer variable types used in C++. Declare, name, and initialize variables. Use character.
VCE IT Theory Slideshows
VCE IT Theory Slideshows
VCE IT Theory Slideshows
CMSC201 Computer Science I for Majors Lecture 22 – Binary (and More)
Documentation Need to have documentation in all programs
Primitive Data Types August 28, 2006 ComS 207: Programming I (in Java)
Unit 16 – Database Systems
VCE IT Theory Slideshows by Mark Kelly study design
Introduction to Primitive Data types
Coding Concepts (Data- Types)
ECE 103 Engineering Programming Chapter 8 Data Types and Constants
C Programming Lecture-3 Keywords, Datatypes, Constants & Variables
Variables and Constants
Introduction to Primitive Data types
Presentation transcript:

VCE IT Theory Slideshows By Mark Kelly vceit.com Data Types 1 a

Mandated data types ITAYear 11*SD text (string)string character string character numberinteger floating point integer floating point date currency logic (Boolean)Boolean * The study design’s intro to Unit 1 also adds “data types such as numeric, text, sound and images (still and moving)”

Boolean (logic) Boolean - stores only a True or False value. Very efficient storage indeed. Ideal for flags which store a yes/no true/false state.

Integer Can not hold fractional parts (decimal places) Short Integer (or Short)- stores values from negative to Long Integer - stores values from negative 2,147,483,648 to 2,147,483,647 Byte - stores values between 0 and 255 in one byte. Efficient storage for small numbers.

Floating point numbers Decimal Real Store numbers with a fractional (decimal) part (e.g ) Single Precision - stores values from e38 to e-45 for negative values and from e-45 to e38 for positive values.

Floating Point Numbers Double Precision - for storing values from e308 to e-324 for negative values and from e-324 to e308 for positive values. The 'e' means 'times 10 to the power of'. In other words e-324 is roughly 4.9 followed by 324 zeroes. It allows extreme precision...

Double precision! 49,000,000,000,000,000,000,000,000,000,000,0 00,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,0 00,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,0 00,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,0 00,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,0 00,000,000,000,000,000,000,000,000,000,000,000,000,000

Currency A special type of floating point that has a high- precision fractional part to prevent bad rounding of cents.

String (text) String - stores text composed of any ASCII* characters (alphabetic letters, numerals, punctuation and control codes like carriage return, backspace, bell). Character - can hold a single ASCII character.

String (text) While strings can store numerals, they cannot interpret the value of numbers and instead treats them as plain text. So if you add "1" and "2" you'll get "12" instead of 3! Beware of this when adding numbers in text boxes!

Special data Date - holds a complete date value (including day, month and year). Date Time (or timestamp) - holds a complete date (DDMMYYYY) and time of day (hours, minutes and seconds)

Special types The programming language C has a special data type designed to hold a pointer to a memory location. Filemaker Pro databases have a container data type which can hold any binary data like video, photo, audio, word processor documents etc

So why bother? Use the right data type to get maximum manipulation power (e.g. don’t store dates as text) Use the right size data type to avoid wasted memory (e.g. using double when byte would do, or using float when number will always be integer) Programs run faster when using smaller, simpler variables.

Using GUI storage structures Textboxes can store numbers, but you’ll have to convert textbox contents to/from number format List boxes/combo boxes are good for displaying data, but not too efficient for heavy storage and manipulation tasks

Next Naming conventions for variables etc Naming conventions

By Mark Kelly vceit.com These slideshows may be freely used, modified or distributed by teachers and students anywhere on the planet (but not elsewhere). They may NOT be sold. They must NOT be redistributed if you modify them. VCE IT THEORY SLIDESHOWS