EMBEDDED SYSTEMS 6
Upcoming SlideShare
Loading in...5
×
 

EMBEDDED SYSTEMS 6

on

  • 543 views

 

Statistics

Views

Total Views
543
Views on SlideShare
543
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

EMBEDDED SYSTEMS 6 EMBEDDED SYSTEMS 6 Presentation Transcript

  • LOGICAL PROGRAMMING
  • Logic Gates
    • AND
    • OR
    • INVERTER
    • EX-OR
  • Bit wise logic
    • Bit wise operator is commonly in software engineering for embedded system and control.
    • But it is very important in doing logical operations in microcontrollers.
    • And(&), Or(|), Ex-Or(^), Inverter(~), Shift Right(>>),Shift Left,(<<). These are the bitwise operator which we are going to study
  • AND
    • AND logic is used in programming when the happening of two events should initiate an action and stop when anyone of the events fails to happen
    1 1 1 0 0 1 0 1 0 0 0 0 Output Input 2 Input
  • OR
    • OR logic is used only when the non-happening of two events should stop an action and initiate it when anyone of the events happens
    1 1 1 1 0 1 1 1 0 0 0 0 Output Input 2 Input
  • INVERTER
    • Inverting logic is used when the happening of an event should stop another event and vice versa.
    0 1 1 0 Output Input
  • Ex-OR
    • Ex-OR logic is used when the difference in the state of two events are used to initiate an action and vice versa.
    0 1 1 1 0 1 1 1 0 0 0 0 Output Input 2 Input 1
  • Shift Right
    • Shift right operator is used when we want to divide the port value by 2 . The number of times the value gets shifted is the number of times the value get divided by 2.
  • Shift Left
    • Shift left operator is used when we want to multiply the port value by 2 . The number of times the value gets shifted is the number of times the value get multiplied by 2.
  • Conclusion
    • Thus many of the arithmetic operations are performed logically by programming the microcontroller accordingly.