Preview

Arithmatic operations of Graphics

Better Essays
Open Document
Open Document
3431 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Arithmatic operations of Graphics
Arithmetic and Logical Operations

Chapter Nine

There is a lot more to assembly language than knowing the operations of a handful of machine instructions. You’ve got to know how to use them and what they can do. Many instructions are useful for operations that have little to do with their mathematical or obvious functions. This chapter discusses how to convert expressions from a high level language into assembly language. It also discusses advanced arithmetic and logical operations including multiprecision operations and tricks you can play with various instructions.

9.0

Chapter Overview
This chapter discusses six main subjects: converting HLL arithmetic expressions into assembly language, logical expressions, extended precision arithmetic and logical operations, operating on different sized operands, machine and arithmetic idioms, and masking operations. Like the preceding chapters, this chapter contains considerable material that you may need to learn immediately if you’re a beginning assembly language programmer.
The sections below that have a “•” prefix are essential. Those sections with a “t” discuss advanced topics that you may want to put off for a while.









• t t t • t t

• t t t t

• t t t t t t

Arithmetic expressions
Simple assignments
Simple expressions
Complex expressions
Commutative operators
Logical expressions
Multiprecision operations
Multiprecision addition operations
Multiprecision subtraction operations
Extended precision comparisons
Extended precision multiplication
Extended precision division
Extended precision negation
Extended precision AND, OR, XOR, and NOT
Extended precision shift and rotate operations
Operating on different sized operands
Multiplying without MUL and IMUL
Division without DIV and IDIV
Using AND to compute remainders
Modulo-n Counters with AND
Testing for 0FFFFF...FFFh
Test operations
Testing signs with the XOR instructions
Masking

You May Also Find These Documents Helpful

  • Satisfactory Essays

    The second category of fault changes individual instructions in the text segment. These faults are intended to approximate the assembly-level manifestation of real C-level programming…

    • 285 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    NT1110

    • 315 Words
    • 2 Pages

    Chapter two discusses the understanding of computer, math, and measurements. Also, it shows you how we use computer math with computer hardware and systems. Some of these concepts are bits versus bytes, binary versus decimal, Boolean operators, hertz, and data transfer. The chapter two also shows numbering systems used in computers. These are some importance skills that will help you in the computer field.…

    • 315 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Figure 1: Overall Block Diagram The goal of this project is to provide you with a more practical hands-on approach to computer architecture design problems. The processor complex you will be designing is a 32-bit version of the MIPS processor; however, the instruction set will be a small subset of the actual MIPS ISA. You should implement the end to end operation of the complex utilizing the VHDL hardware descriptive language. You may use any constructs within the VHDL language, however, the design must be of your own. Copying of any form from any other student or any internal or external sources is illegal and will not be accepted. The processor supports the three instruction formats: R-format, I-format, and J-format as described in the text book and lectures. Table I Summarizes the core set of instructions for your ISA. The memory is assumed to be byte addressable and each word is 32 bits.…

    • 1082 Words
    • 5 Pages
    Good Essays
  • Better Essays

    Assembly language enables programmers to relate op codes using symbolic names in place of numbers to perform an instruction or input a piece of data. Programmers can inscribe op codes using purposeful words like JUMP, CLEAR, and ADD as an alternative to cryptic binary codes consisting of series of 0s and 1s. An example of assembly language, machine language and its meaning are listed in the book called, “Invitation to Computer Science” (Schneider & Gersting, 2013, pp. 285, fig. 6.5). In figure 6.5, assembly language is clearly easier to comprehend than machine language, which makes assembly language user friendly.…

    • 2002 Words
    • 9 Pages
    Better Essays
  • Satisfactory Essays

    Many convenient, and powerful instructions Many, convenient – Example: Intel Copyright © 2012 Pearson Education, Inc. 0-7 Machine Instruction Types • Data Transfer: copy data from one location to t another th • Arithmetic/Logic: use existing bit patterns to compute a new bit patterns • Control: direct the execution of the program Copyright © 2012 Pearson Education, Inc. 0-8 4 Figure 2.2…

    • 783 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    Assembly languages are dead. The last time I used one was 2003. Since then it has been HLSL and GLSL for everything. I haven't looked back.…

    • 3162 Words
    • 13 Pages
    Good Essays
  • Powerful Essays

    Why Learn Assembly Language

    • 3719 Words
    • 15 Pages

    | Why Learning Assembly Language Is Still a Good Ideaby Randall Hyde, author of Write Great Code (No Starch)…

    • 3719 Words
    • 15 Pages
    Powerful Essays
  • Good Essays

    Risc vs Cisc

    • 826 Words
    • 4 Pages

    Facilitate the extensive manipulation of low-level computational elements and events such as memory, binary arithmetic, and addressing.…

    • 826 Words
    • 4 Pages
    Good Essays
  • Good Essays

    A few starred sections should be considered “advanced” and can be omitted at first reading.…

    • 268 Words
    • 2 Pages
    Good Essays
  • Better Essays

    Harpreet Singh Dhillion ,AbhijitMitra – “ A Reduced Bit Multiplication Algorithm for Digital Arithmetic “ , International Journal of Computational and Mathematical Sciences, WASET, Spring 2008.…

    • 1697 Words
    • 7 Pages
    Better Essays
  • Good Essays

    Because writing programs in machine language is impractical (it is tedious and error prone), symbolic, or assembly, languages—second-generation languages—were introduced in the early 1950s. Assembly language turns the sequences of 0s and 1s into human words like 'add'. They use simple mnemonics such as A for “add” or M for “multiply,” which are translated into machine language by a computer program called an assembler. The resulting machine language programs, however, are specific to one type of computer and will usually not run on a computer with a different type of central processing unit (CPU).…

    • 782 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Half Adder

    • 2129 Words
    • 9 Pages

    Step 2. Apply the input combinations given table 1 and observe the output. Which LED represents the SUM and which LED represents the CARRY?…

    • 2129 Words
    • 9 Pages
    Good Essays
  • Satisfactory Essays

    Storage assignment- modification of identifier and literal tables.it makes entries in matrix that allow code generation to creat code that allocates dynamic storage,and also allow the assembly phase to reserve the proper amounts of STATIC storsge.…

    • 396 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    As we identify the six basic computer operations that are used to write computer programs, use of pseudo code terms will also help identify if the particular action being described is part of the program’s input, processing, or output component of the program. The six basic computer operations are:…

    • 1015 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Niklaus Wirth

    • 306 Words
    • 1 Page

    Wirth was the chief designer of the programming languages Euler, Algol W, Pascal,Modula, Modula-2, Oberon, Oberon-2, and Oberon-07. He was also a major part of the design and implementation team for the Lilith and Oberon operating systems, and for the Lola digital hardware design and simulation system. He received theACM Turing Award for the development of these languages in 1984 and in 1994 he was inducted as a Fellow of the ACM. He designed the simple programming language PL/0 to illustrate compiler design. It has formed the basis for many university compiler design classes.…

    • 306 Words
    • 1 Page
    Satisfactory Essays