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

Order in which filters get implemented, If we have multiple filters implet...

If we have multiple filters impleted, what is the order in which these filters get implemented?   Ans) 1. Authorization filters 2. Response filters 3. Action filters

Internal organization of memory chip - computer architecture, Internal Orga...

Internal Organization of memory chip: Word line & bit lines 16x8 organization : 16 words of 8 bits per Form of an array

Control signals from control bus, Control Signals from Control Bus: A numb...

Control Signals from Control Bus: A number of the control signals are provided to control unit by the control bus. These signals are issued from outside the CPU.  Some of these si

Describe the concept of aggregation, Aggregation Aggregation is a spec...

Aggregation Aggregation is a special form of association that models the "part-whole" or "a-part-of" relationship as an aggregate (the whole) and parts. The most important pro

Explain the compiler - computer programming, Explain the Compiler - Compute...

Explain the Compiler - Computer Programming? The Compiler is a program that translates source code into object code. The compiler derives its name from the means it works looki

How swapping increase overheads of the operating systems, Does swapping inc...

Does swapping increase the Operating Systems' overheads? Justify your answer. A process can be swapped out temporarily of memory to a backing store and after that brought back

Concepts of evolution are used by the genetic algorithm, Q. What basic conc...

Q. What basic concepts of evolution are used by the genetic algorithm? ANSWER: The three concepts are selection, crossover and mutation. Selection is the feature of a genetic a

Display data in a repeater control, Which template must you provide, in ord...

Which template must you provide, in order to display data in a Repeater control? ItemTemplate.To display data in the ItemTemplate, declare one or more Web server controls and s

By which MTU is specified, MTU is specified by? MTU is specified by har...

MTU is specified by? MTU is specified by hardware technology.

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