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
  • 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
  • Satisfactory Essays

    The objective of the lab session is to write an assembly level language program to sort an array of decimal numbers in ascending order.…

    • 328 Words
    • 2 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
  • Good Essays

    corlang

    • 386 Words
    • 2 Pages

    Instructions can be used to perform signed or unsigned division, respectively, of the destination operand by powers of 2. For example, using the SAR instruction to shift a signed integer 1 bit to the right divides the value by 2.…

    • 386 Words
    • 2 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
  • 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
  • Good Essays

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

    • 268 Words
    • 2 Pages
    Good 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
  • 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
  • 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
  • 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

    SYlabus OBE CSFUNDAMENTALS

    • 1149 Words
    • 8 Pages

    This course provides an overview of computers, number systems, data types and representations, digital logic systems, assembly and machine language, compilers and translators, operating systems, and internetworking.…

    • 1149 Words
    • 8 Pages
    Good Essays