Functional Programming


symbol[‘(‘] identifier[‘a‘]



Yüklə 13,58 Kb.
səhifə2/3
tarix22.03.2024
ölçüsü13,58 Kb.
#183045
1   2   3

symbol[‘(‘]

identifier[‘a‘]

symbol[‘==‘]

identifier[‘b‘]

symbol[‘)‘]

keyword[‘return‘]

symbol[‘;‘]


to a syntax tree (parse tree)
if-statement
statement
identifier
b
a
identifier
expression
equality operator
return stmt

Optimization

int a = 10;

int b = 20 – a;

if (a == b) return;


Constant propagation can deduce that always a==b, allowing the optimizer to transform the tree:
if-statement : OK
statement : OK
identifier : int
b
a
identifier : int
expression : bool
equality operator :
integer equality
return stmt : void
if-statement : OK
statement : OK
true
constant : bool
return stmt : void
return stmt : void

Hardware devices


Input

Output

Storage

Keyboard

Monitors

External Hard Disk

Mice

Printers

Flash Drives

Graphics Tablet

Speakers

Touchscreens
Scanner

Microphone

Keyboard

What is it used for?

  • Keyboards are used to construct words and put them into a computer to write documents or other forms of text. It can also be used to trigger shortcuts to other actions like copy and pasting or interactivity in computer gaming.
  • How does it work?

  • The plastic or metal button connects to a metal component that completes a circuit, sending the current through a specific wire and into the computer, which takes it as a signal to type that key.

Computer Mouse


What is it used for?
  • Computer mice are used to navigate the options available on screen. It is also used in using icons and interactivity in gaming.

  • How does it work?
  • A laser bounces off the surface it is being used on, the movements are then tracked by the computer and transferred into movement of the mouse pointer.

Graphics Tablet


What is it used for?
Graphics tablets are used to draw images by hand onto a tablet and transfer them onto the computer immediately. Graphics tablets are most commonly used for animations.
How does it work?

Touchscreen


What is it used for?
  • Touchscreens are used so that people can directly manipulate things on a screen with their fingers, without the use of a mouse.

  • How does it work?
    • The screen has many surface-acoustic sensors and constant beams of Ultrasonic sound. When a finger breaks the beam by pressing the screen, it triggers the microchip controller to take action if there is an option to press something there.

Scanner

What is it used for?

Scanners are used to transfer information on printed or written sheets to a

Computer.

How does It work?

A scanner works by collecting light using charged couples devices which convert the light into electronic signals that are sent to the computer.

microphone

What is it used for?

Microphones are used for recording sound and transferring it to a computer.

How does it work?

Microphones convert sound energy into electrical energy. Different types of microphone have different ways of converting energy which makes them better at recording different things


1. Russia is the ____________ country in the world
3. My father is ___________ than my mother
4. Monkey’s tail is ____________ than cat’s tail
5. My little brother is very ________
6. I think that bananas are _____________ than oranges
7. I am ____________ than my sister

Yüklə 13,58 Kb.

Dostları ilə paylaş:
1   2   3




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©genderi.org 2024
rəhbərliyinə müraciət

    Ana səhifə