Numbering Systems. Computers do not use English. They do not use words Computers run on NUMBERS only Those numbers are in BINARY only.

Slides:



Advertisements
Similar presentations
Chapter 11 Introduction to Programming in C
Advertisements

EMS1EP Lecture 4 Intro to Programming Dr. Robert Ross.
Microsoft® Small Basic
John Owen, Rockport Fulton HS
HEXADECIMAL NUMBERS Code
The Little man computer
Intro Programming By Trevor Decker Team 1743 By Trevor Decker Team 1743.
Software. What Is Software? software –Also called Computer programs –Are a list of instructions –Instructions are called code –CPU performs the instructions.
Program Design and Development
1 Lab Session-IV CSIT-120 Spring 2001 Lab 3 Revision and Exercises Rev: Precedence Rules Lab Exercise 4-A Machine Language Programming The “Micro” Machine.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Hello, world! Dissect HelloWorld.java Compile it Run it.
SOFTWARE SYSTEMS SOFTWARE APPLICATIONS SOFTWARE PROGRAMMING LANGUAGES.
Introduction to C. A Brief History Created by Dennis Ritchie at AT&T Labs in 1972 Originally created to design and support the Unix operating system.
An Introduction to C Programming Geb Thomas. Learning Objectives Learn how to write and compile a C program Learn what C libraries are Understand the.
Numbering Systems Decimal (Denary) base 10. Clumsy when dealing with computers. Other systems –Binary –Octal –Hexadecimal Convenient when dealing with.
Storing data Getting data out Data types Ruby as a foundation Program Variables Click icon to hear comments (the download may take a minute)
Intro. to Game Programming Want to program a game?
CS140: Intro to CS An Overview of Programming in C by Erin Chambers.
INTRODUCING COMPUTER SCIENCE CSCI N341: Client-Side Programming.
C Programming Lecture 3. The Three Stages of Compiling a Program b The preprocessor is invoked The source code is modified b The compiler itself is invoked.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
How Computers Work Dr. John P. Abraham Professor UTPA.
Hello World 2 What does all that mean?.
Higher Grade Computing Studies 2. Languages and Environments Higher Computing Software Development S. McCrossan 1 Classification of Languages 1. Procedural.
Programming. What is a Program ? Sets of instructions that get the computer to do something Instructions are translated, eventually, to machine language.
RM2D Let’s write our FIRST basic SPIN program!. The Labs that follow in this Module are designed to teach the following; Turn an LED on – assigning I/O.
AS Computing Introduction to Programming. What is a Computer Program? A list of instructions that a computer must work through, in a logical sequence,
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
Computer Programming I. Today’s Lecture  Components of a computer  Program  Programming language  Binary representation.
Discussion of Assignment 9 1 CSE 2312 Computer Organization and Assembly Language Programming Vassilis Athitsos University of Texas at Arlington.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
Algorithm is a prescribed set of well defined rules or instructions for the solution of the problem. Algorithmic language is a language or notation used.
Programming For Security Professionals March 23, 2010 MIS 4600 – MBA © Abdou Illia.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
How Computers Work … and how you can work them. Art 315 Lecture 03 Dr. J Parker Fall 2010.
How to start Visual Studio 2008 or 2010 (command-line program)
Binary Values and Number Systems
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Positional Notation 642 in base 10 positional notation is:
Getting Started with MATLAB 1. Fundamentals of MATLAB 2. Different Windows of MATLAB 1.
The LC-3 – Chapter 7 COMP 2620 Dr. James Money COMP
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
I Power Higher Computing Software Development Development Languages and Environments.
1 Computer Science LESSON 1 on Number Bases. 2 Objective In this lesson you’ll learn about different Number Bases, specifically about those used by the.
Introduction to C CMSC 104, Section 4 Richard Chang 1.
Agenda Computer Languages How to Write a Simple C Program
LOW vs. HIGH Level Languages
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Computer Systems – Machine & Assembly code. Objectives Machine Code Assembly Language Op-code Operand Instruction Set.
APL TANNER SMITH ALEXA BREELANDTYLER SIMS. Overview  Functional Language  Named after the book A Programming Language  Paradigms:  Array, functional,
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
INTRODUCTION TO PROGRAMING System Development Mansoura October 2015.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
Binary, Decimal and Hexadecimal Numbers 1. Numbering Systems Radix - In mathematical numeral systems, the radix or base is the number of unique digits,
Quiz 1 A sample quiz 1 is linked to the grading page on the course web site. Everything up to and including this Friday’s lecture except that conditionals.
1 Chapter 1: Introduction Appendix A: Binary and Hexadecimal Tutorial Assembly Language for Intel-Based Computers, 3rd edition Kip R. Irvine.
The Little man computer
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
Computer Science LESSON 1 on Number Bases.
Number Systems.
Programming in Perl Introduction
Digital Logic Design (CSNB163)
Your questions from last session
AP Computer Science LESSON 1 on Number Bases.
John Owen, Rockport Fulton HS
Beyond Base 10: Non-decimal Based Number Systems
Chapter 6 Programming the basic computer
Presentation transcript:

Numbering Systems

Computers do not use English. They do not use words Computers run on NUMBERS only Those numbers are in BINARY only

 Computers have used a variety of numbering systems (over the years)  More primitive to more complex  Binary  Machine Code (Assembly)  Programming Languages  Use compilers to make machine code  Great many of them!!  Ex: Visual Basic.NET

assume cs:cseg,ds:cseg,ss:nothing,es:nothing jmp p150; start-up code jumpval dd 0; address of prior interrupt signature dw whozat; program signature statedb 0; '-' = off, all else = on waitdw 18; wait time - 1 second or 18 ticks hourdw 0; hour of the day atimedw 0ffffh; minutes past midnite for alarm acountdw 0; alarm beep counter - number of seconds (5) atonedb 5; alarm tone - may be from 1 to the ; higher the number, the lower the frequency alengdw 8080h; alarm length (loop count) may be from 1-FFFF dhoursdw 0; display hours db ':' dminsdw 0; display minutes db ':' dsecsdw 0; display seconds db '-' ampmdb 0; 'A' or 'P' for am or pm

 Look at the evolution of one simple program here here

 APL: A mathematical language. (~R ∊ R ∘.×R)/R←1↓ ⍳ R ‘ Find primes 1-R  ALGOL: First second generation language. BEGIN FILE F (KIND=REMOTE); EBCDIC ARRAY E [0:11]; REPLACE E BY "HELLO WORLD!"; WHILE TRUE DO BEGIN WRITE (F, *, E); END; END.

 C: General purpose programming. #include int main(void) { printf("hello, world\n"); return 0; }  Basic: Many versions since then. INPUT "What is your name: ", UserName$ PRINT "Hello "; UserName$ DO INPUT "How many stars do you want: ", NumStars Stars$ = STRING$(NumStars, "*") PRINT Stars$ DO INPUT "Do you want more stars? ", Answer$ LOOP UNTIL Answer$ <> "" Answer$ = LEFT$(Answer$, 1) LOOP WHILE UCASE$(Answer$) = "Y" PRINT "Goodbye "; UserName$

 VB.NET: Visual Programming with.NET libraries. Module Module1 Sub Main() Console.WriteLine("Hello, world!") End Sub End Module  This is NOT the visual version of the program (stay tuned for that!)  This is NOT the pinnacle of programming  It is, however, a very useful, very easy to learn language

 Before we can start to program, we need to understand the basic numbering systems  From time to time they will be used in our code  Once upon a time, they were essential to programming. Now they are merely useful  Several basic numbering systems:  Decimal  Binary  Octal  Hexadecimal

 Base 10 numbers  Numbering system we all grew up with  For example:  1,050,423  We all know how to manipulate these numbers  Addition, subtraction, multiplication, etc  Many ways to use these numbers.  Ex: AbacusAbacus  Other numbering systems are no different really  Just a different base than 10

 What computers really use  Base 2  Only symbols used are: 0, 1  Each digit represents a power of 2  Tutorial:

 Base 8 “Octa”  Not used much anymore  Used a LOT in early computing  Group three binary digits together  Each group forms numbers from 0-7  Used for one common task today: ASCIIASCII

 Base 16  Digits are: ABCDEF  Each digit is a power of 16  16^0  16^1  16^2  Etc Click here for more information

New Math (1964)