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

Define memory utilization factor, Memory utilization factor shall be comput...

Memory utilization factor shall be computed as? Ans. memory in use/total memory connected.

What is source and listener, A source is an object that produces an event. ...

A source is an object that produces an event. This happens when the internal state of that object changes in some way. A listener is an object that is notified when an event happen

What are the event key words in interactive reporting, What are the event k...

What are the event key words in interactive reporting? Event Keyword                                                 Event AT LINE-SELECTION         Moment at which the u

Prove using boolean algebra, Q.Prove using Boolean Algebra 1. X (X+Y) = ...

Q.Prove using Boolean Algebra 1. X (X+Y) = X 2. AB + AC + BC' = AC + BC' 3. (A+B+C) (A+B'+C') (A+B+C') (A+B'+C)=A 4. (A+B'+C) (AB+A'C) = (A+C) (A'+B) 5. XY + XZ + YZ

Elevation of the premature ventricular contraction, As spring approaches, y...

As spring approaches, your design firm has been tasked with designing a two-lane highway in rural Wyoming. The highway descends a hill, crosses a river, and must shift to a para

Number system, Number systems   Consider a decimal number:         ...

Number systems   Consider a decimal number:               7654.32   Short hand for:            7 * 103 + 6*102 + 5* 101 + 4*100 + 3*10 -1  + 2*10 -2   Likewise

Select-options and parameters statement , The fields specified by select-op...

The fields specified by select-options and parameters statement cannot be grouped together in the selection screen. No, the fields specified by select-options and parameters s

Explain about the logical devices, Explain about the Logical Devices ...

Explain about the Logical Devices Locator, to indicate a position and/or orientation Pick, to select a displayed entity To input a single value in the space of re

Explain the working of a 3-bit D/A converter, With the help of R-2R binary ...

With the help of R-2R binary network, explain the working of a 3-bit D/A converter and derive an expression for the output voltage. Ans: We see a 3-bit R-2R ladder D/A netwo

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