You are on page 1of 3

A clock (better represented as clk) is a signal which is used to make the flipflop

work at its positive or negative edge (in exceptional case both edge).

But, an enable is a signal which makes the flipflop function as long as it is high
(1). It can be made low (0) to make the flipflop stops its function.

CLOCK:

In a sequential system, there may be several things going on at the same time. So,
we need some timing or clocking mechanism so as to decide when the output is going
to change i.e. at which point of time things will change. There are several stages
in a circuit and each of these stages will have to take an input from previous
state, process it and give an output. They cannot work at random. If they work
randomly, some of them will work faster than the other or some of them will take
the previous output of the previous state and process it even before the present
output is processed. So, we try to synchronize the working of all the subsystems in
a sequential system by using a clock. Therefore, clock is used to bring some
regularity to the system.

So, a clock signal is a particular type of signal that oscillates between a high
and a low state and it is used to coordinate actions of digital circuits.

A clock signal is produced by a clock generator. Although more complex arrangements


are used, the most common clock signal is in the form of a square wave with a 50%
duty cycle, usually with a fixed, constant frequency. Circuits using the clock
signal for synchronization may become active at either the rising edge, falling
edge, or both in the rising and in the falling edges of the clock cycle.

BROWSER COMPATIBILITY AND TRANSPILATION


Review
In this lesson, you learned about browser compatibility and transpilation. Let�s
review the key concepts:

ES5 � The old JavaScript version that is supported by all modern web browsers.
ES6 � The new(er) JavaScript version that is not supported by all modern web
browsers. The syntax is more readable, similar to other programming languages, and
addresses the source of common bugs in ES5.
caniuse.com � a website you can use to look up HTML, CSS, and JavaScript browser
compatibility information.
Babel � A JavaScript package that transpiles JavaScript ES6+ code to ES5.
npm init � A terminal command that creates a package.json file.
package.json � A file that contains information about a JavaScript project.
npm install � A command that installs Node packages.
babel-cli � A Node package that contains command line tools for Babel.
babel-preset-env � A Node package that contains ES6+ to ES5 syntax mapping
information.
.babelrc � A file that specifies the version of the JavaScript source code.
"build" script � A package.json script that you use to tranpsile ES6+ code to ES5.
npm run build � A command that runs the build script and transpiles ES6+ code to
ES5.
For future reference, here is a list of the steps needed to set up a project for
transpilation:

Initialize your project using npm init and create a directory called src
Install babel dependencies by running
npm install babel-cli -D
npm install babel-preset-env -D
Create a .babelrc file inside your project and add the following code inside it:
{
"presets": ["env"]
}
Add the following script to your scripts object in package.json:
"build": "babel src -d lib"
Run npm run build whenever you want to transpile your code from your src to lib
directories.

R-

# Store the murder rate per 100,000 for each state, in `murder_rate`

murder_rate <- murders$total/murders$population*100000

# Store the `murder_rate < 1` in `low`

low <- murder_rate < 1

# Create a vector ind for states in the Northeast and with murder rates lower than
1.

ind <- low & murders$region == "Northeast"

# Names of states in `ind`


murders$state[ind]

murders$state[ind]

"Maine" "New Hampshire" "Vermont"

##############
##############

You might also like