Bit manipulation techniques and mathematical functions, Computer Engineering

Assignment Help:

 Within micro controller's software, it is very useful to be able to manipulate binary bits i.e. from ports etc. The ALU has command to shift data, rotate data, compare data, set/clear bits, test bits and logical operate on data.

  LSLA     i.e shift A one place to the left fill up with 0
  LSLB     i.e shift B one place to the left fill up with 0
  LSRA     i.e shift A one place to the right fill up with 0
  LSRB     i.e shift B one place to the right fill up with 0
  ROLA     i.e rotate A one place to the left through carry
  ROLB     i.e rotate B one place to the left through carry
  RORA     i.e rotate A one place to the right through carry
  RORB     i.e rotate B one place to the right through carry
   CBA      i.e  A-B  with no answer stored just flags set
  CMPA    i.e compare A with memory i.e A-M
  CMPB    i.e compare B with memory i.e B-M
  BSET $20,#$1   i.e set bit 1 of memory address 20
  BCLR $20,#$1   i.e clear bit 1 of memory address 20
  BITA $20    i.e Check bit mask found in A with address 20
  BITB $20    i.e Check bit mask found in A with address 20
  ANDA $20   i.e logical and A with data at address 20
  EXORA $20  i.e logical exor A with data at address 20
  COM $20     i.e logical invert data at address 20 
  ORRA $20    i.e logical OR A with data at address 20
  MUL           ;Multiplies axb and stores the answer in D i.e both
  FDIV          ;Fractional divide using D/IX
  IDIV           ;Integer divide using D/IX
  ADDD         ;16 bit add to D
  DAA           ;Decimal adjust add sum to BCD data


Related Discussions:- Bit manipulation techniques and mathematical functions

Assembly Language program, How to get an output: Please enter a number betw...

How to get an output: Please enter a number between 0 and 6 (Enter to stop): 2 The Day of Week is Tuesday Please enter a number between 0 and 6 (Enter to stop): 9 Input Invalid Ple

Computer architecture, what is complex instruction set computer and reduce...

what is complex instruction set computer and reduced complex instruction set computer

Explain the odd-even transposition algorithm, Q. Explain the odd-even trans...

Q. Explain the odd-even transposition algorithm? The algorithm needs one 'for loop' beginning from I=1 to N it implies that N times and for every value of I, one 'for loop' of

How much frequency is centered in typical human voice, Typical human voice ...

Typical human voice is centered around                   Hz. (A)  200-400                                     (B)  280-3000  (C)  400-600

Give an example of first fit and best fit algorithms, Given memory partiti...

Given memory partitions of 100k, 500k, 200k, 300k, and 600k (in order), apply first fit and best fit algorithms to place processes with the space requirement of 212k, 417k, 112k an

TITLE: Signals for digital communications, DETERMINE ANALYTICALY IF THE SIG...

DETERMINE ANALYTICALY IF THE SIGNAL IS PERIODIC OR NOT - X[n] = 4Cos(Pi n)

Stencil duplicating, Stencil Duplicating Equipment Required Stenci...

Stencil Duplicating Equipment Required Stencil Duplicator Thermal copier (optional) Electronic stencil cutter Materials Stencil COPY paper Ink Clean

Instruction per cycle in RISC, Q. Instruction per cycle in RISC? One in...

Q. Instruction per cycle in RISC? One instruction per cycle: A machine cycle is total time taken to fetch two operands from registers perform ALU operation on them and store re

Engineering phyics, what is interference of light explain the nessicity of ...

what is interference of light explain the nessicity of coharent source for obtaining sustain interference pattern

What is branch folding, What is branch folding? The instruction fetch u...

What is branch folding? The instruction fetch unit has implemented the branch instruction concurrently with the implementation of other instructions. This technique is referred

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd