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

Application area of artificial intelligence, 1. The State of the Art: What ...

1. The State of the Art: What can AI do today? A concise answer is difficult because there are so many activities in so many subfields. Here we sample a few applications other

Explain the action of an interrupt processing routine, Explain the action o...

Explain the action of an interrupt processing routine? Action of an interrupt processing routine is as follows : 1. Save contents of registers of CPU. This action is not e

What do you mean by first fit, What do you mean by first fit? First fi...

What do you mean by first fit? First fit allocates the first hole that is big enough. Searching can either begin at the beginning of the set of holes or where the last first-f

General concepts of links and association, General Concepts of links and as...

General Concepts of links and association A link is a conceptual or physical connection among objects for instance. Mathematically, you can define a link as a tuple which is a

What is the difference between activity and sequence diagram, The following...

The following are the difference among Activity and Sequence Diagrams: A sequence diagram represents the way of processes implement in a sequence. For example, the order of op

Explain about the mini computers, Explain about the MINI COMPUTER Minic...

Explain about the MINI COMPUTER Minicomputers are much smaller in size than mainframe computers and they are also less expensive.  The cost of these computers can differ from a

Functions in first-order logic sentences, Functions in first-order logic se...

Functions in first-order logic sentences - artificial intelligence: Functions may be thought of as special predicates, where we think of all but 1 of the arguments as input and

What is concurrent control, What is concurrent control? Control resides...

What is concurrent control? Control resides concurrently in various independent objects, every a separate task. A task can wait for input but other task continues implementatio

What is locality of reference, What is locality of reference? Analysis ...

What is locality of reference? Analysis of program represents that many instructions ion localized areas of the program are implemented repeatedly during some time period, and

What is a file, What is a file? A file is a named collection of relate...

What is a file? A file is a named collection of related information that is recorded on secondary storage. A file having either programs or data. A file has sure "structure" b

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