CS 206D Computer Organization

Slides:



Advertisements
Similar presentations
Logic Gates.
Advertisements

BINARY & HEX I/O. Binary input : read in a binary number from keyboard, followed by a carriage return. character strings of 1’s & 0’ we need to convert.
IN THE SUPERVISIONS OF: DR\KAMEL ALI ARRAM ENG\LAMIAA Computer Vision Course.
1 The 2-to-4 decoder is a block which decodes the 2-bit binary inputs and produces four output All but one outputs are zero One output corresponding to.
I/O: SPARC Assembly Department of Computer Science Georgia State University Georgia State University Updated Spring 2014.
©Brooks/Cole, 2003 Chapter 4 Operations on Bits. ©Brooks/Cole, 2003 Apply arithmetic operations on bits when the integer is represented in two’s complement.
Computer Organization & Assembly Language
In a not gate, if the input is on(1) the output is off (0) and vice versa.
CS-280 Dr. Mark L. Hornick 1 ASCII table. 2 Displaying Numbers as Text Problem: display numerical values as text Consider the numerical value 0x5A held.
CS 210.  How do we represent data in a computer? ◦ Easy to recognize two conditions:  1. Presence of a voltage – we’ll call this state “1”  2. Absence.
C Summary Wilmer Arellano. References Excerpts from the book: Predko, Myke. (2005). 123 PIC MICROCONTROLLER EXPERIMENTS FOR THE EVIL GENIOUS. USA: McGraw-Hill.
XOR and XNOR Logic Gates. XOR Function Output Y is TRUE if input A OR input B are TRUE Exclusively, else it is FALSE. Logic Symbol  Description  Truth.
Computer Sensing and Control How is binary related to what we are trying to accomplish in electronics? The PC GadgetMaster II uses binary to communicate.
11.1/36 Repeat: From Bits and Pieces Till Strings.
ICS312 Set 9 Logic & Shift Instructions. Logic & Shift Instructions Logic and Shift Instructions can be used to change the bit values in an operand. The.
Dr. José M. Reyes Álamo 1.  Review: ◦ Statement Labels ◦ Unconditional Jumps ◦ Conditional Jumps.
CSC 270 – Survey of Programming Languages C Lecture 5 – Bitwise Operations and Operations Miscellany.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
REGISTER TRANSFER LANGUAGE MICROOPERATIONS. TODAY OUTLINES Logic Microoperations Shift Microoperations.
Logic Design CS 270: Mathematical Foundations of Computer Science Jeremy Johnson.
Linear Algebra. Circuits The circuits in computers and other input devices have inputs, each of which is either a 0 or 1, the output is also 0s and 1s.
Logic Conditional Processing. Status flags - review The Zero flag is set when the result of an operation equals zero. The Carry flag is set when an instruction.
1 Ethics of Computing MONT 113G, Spring 2012 Session 5 Binary Addition.
Intro to Nested Looping Intro to Computer Science CS1510 Dr. Sarah Diesburg.
1 Logic, Shift, and Rotate Instructions Read Sections 6.2, 7.2 and 7.3 of textbook.
CSE 351 Number Representation & Operators Section 2 October 8, 2015.
CS101 Processor and Ram How do the zeros and ones change form in the processor?
Department of Electrical and Computer Engineering University of Minnesota Presenter: Chi-Yun Cheng Digital Logic with Molecular Reactions.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
Logic Gates Chapter 5 Subject: Digital System Year: 2009.
Bit Manipulation in 'C' 'C' bit operators
Microprocessor & Assembly Language
Computer and Information Sciences College / Computer Science Department CS 206 D Computer Organization and Assembly Language.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
Computer Hardware & Operation Northern College Diploma Philip Bird.
Programming PIC 16F84A in Assembly. PIC16F84 pin-out and required external components.
CS 111 – Aug. 27 Section 1.1 –Binary data and operations –Logic gates –Flip-flop –A binary shorthand: hexadecimal Commitment for next day: –Please read.
Chapter 12. Chapter Summary Boolean Functions Representing Boolean Functions Logic Gates Minimization of Circuits (not currently included in overheads)
Bitwise Operations C includes operators that permit working with the bit-level representation of a value. You can: - shift the bits of a value to the left.
Computer Architecture & Operations I
Computing Binary Logic.
Chapter 3 - Binary Numbering System
Chapter 4 Operations on Bits.
Computer Fundamentals
Overview Register Transfer Language Register Transfer
University of Gujrat Department of Computer Science
Defining Types of data expression Dn [name] expression Dn [name]
Morgan Kaufmann Publishers Computer Organization and Assembly Language
Ken D. Nguyen Department of Computer Science Georgia State University
Comparison and Data-handling Instructions
Comparison and Data-Handling Instructions
Boolean Operations 1 and 1 = 1.
REGISTER TRANSFER LANGUAGE
CS101 Processor and Ram.
Bitwise Operators CS163 Fall 2018.
CS-401 Computer Architecture & Assembly Language Programming
Shift & Rotate Instructions)
Digital Logic.
Symbolic Instruction and Addressing
Shift & Rotate Instructions)
Binary Numbers.
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Bitwise Operators.
Prof. Onur Mutlu ETH Zurich Spring March 2019
Microprocessor and Assembly Language
Computer Organization and Assembly Language
Ken D. Nguyen Department of Computer Science Georgia State University
靜夜思 床前明月光, 疑是地上霜。 舉頭望明月, 低頭思故鄉。 ~ 李白 李商隱.
Bit Manipulations CS212.
Digital Logic Design.
Presentation transcript:

CS 206D Computer Organization Lab4 CS 111

Logic instructions Logic Instructions CS 111

AND destination, source OR destination, source XOR destination, source Logic instructions AND destination, source OR destination, source XOR destination, source NOT destination CS 111

AND The AND instruction can be used to clear specific Destination bits while preserving the others. A zero mask bit clears the corresponding Destination bit A one mask bit preserves the corresponding destination bit. CS 111

OR The OR instruction can be used to set specific Destination bits while preserving the others. A one mask bit sets the corresponding Destination bit A zero mask bit preserves the corresponding Destination bit. CS 111

XOR The XOR instruction can be used to invert specific Destination bits while preserving the others. A one mask bit inverts the corresponding Destination bit A zero mask bit preserves the corresponding Destination bit. CS 111

Programming questions – q 1 Declare data and display prompt message CS 111

Programming questions – q 1 (Cont.) Read binary number We assume that the input characters are either ‘1’ , ‘0’ or carriage return. And at most 16 bits are input. CS 111

Programming questions – q 1 (Cont.) Output the content of BX in HEX. CS 111