1/43
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
logic gate
a device that acts as a building block for digital circuits by performing a logical operation on one or more binary inputs to produce a single binary output.
NOT gate
a logic gate that inverts the input signal, producing a binary output that is the opposite of the input.
AND gate
a logic gate that outputs a binary high (1) signal only when all of its inputs are binary high (1).
OR gate
a logic gate that outputs a binary high (1) signal if at least one of its inputs is binary high (1).
NAND gate
a logic gate that outputs a binary low (0) signal only when all of its inputs are binary high (1).
NOR gate
a logic gate that outputs a binary low (0) signal if at least one of its inputs is binary high (1).
XOR gate
a logic gate that outputs a binary high (1) signal only when the number of its binary high inputs is odd.
simplex transmission
one direction - sending data to or recieving data from a device
half duplex data transmission
sending data to and from devices, both devices but only one at a time
full duplex (duplex)
both directions at the same time
interface
point at which two computers systems communicate
serial interface
interface to allow serial communication between the microcontroller or microprocessor using a serial cable
serial communication
one bit of data is sent at a time
slower, but less expensive than parallel bc only 1 data channel is used
reliable over long distance
less likely to get skewed at the recieving end bc only 1 wire is used
easier to collate data after transmission than parallel
synchronised serial communication
the timing for when each bit is sent may be synchronised to the oscillations of an on-board clock
reciever counts how many bits were sent and reassembles the bits into bytes
timing must be accurate as no control bits are used. timing signals are sent WITH the data
it is faster as only data bits are sent
asynchronous serial communication
data is packaged and sent across to another device as a packet. files are broken up into many packets and reassembled at the receiving end.
format of a packet
frame
frame formats
defined by the protocol being used
USB
universal serial bus
advantages of all USB
incorrect connections are prevented
industry standard - compatibility
devices can be charged and powered at the same time by a USB cable
doesnt require wireless, so can be used in a network is done
USB-C
symmetrically double pins
can be inserted either way
more power than older USBs
most modern protocols can run over USB-c
parallel communication
several bits bieing sent at the time on a link with several channels in parallel with each other
fastest as multiple bits are sent over mmultiple wires or data channels at the same time
allows read/write at the same time
best for short distances as data can go out of synchronisation
uses of parallel transmission
inside integrated circuits - tiny microchip computers in embedded systems eg washing machines and microwaves
inside the CPU of a computer system
why is parallel not used more widely
signal degradation - long distances
timing issues - data may be wrongly alligned
complex design - take up more space
port
connection point or interface between a computer and en external or internal hardware device
software port
a virtual point where network connections start and end
protocols
sets of rules and standards for how data is transmitted and received over a network
what do protocols determine
how data packets are structured
encoding methods
error detection
addressing
session persistance
security
IDE
integrated development environment - where software programs are written eg pycharm, IDLE
bootloader (arduino)
piece of software that allows you to upload code you write to the arduino
open source hardware
where anyone can see the design specification of a physical object
parity error checking
odd/even parity is agreed on by the communicating devices
odd parity means in total there will be an odd number of 1s
in every byte, 7 bits are data and 1 bit is the parity bit
the parity bit allows adjustment so the overall number of 1s adds to the agreed parity
if parity is incorrect, an error is detected
time to live variable
packets are designed with an expiration date called a TTL (time-to-live) or hop limit bc of the risk that packets will continue to pass from router to router indefinitely
each packet has a place where it stores a numerical value determining how much longer it should continue to move through the network
every time a router receives a packet, it subtracts 1 from the TTL (common no for TTL is 64)
if TTL is 0, the router will discard the packet and send a message back to the originating host
high level languages
can be used on many different types of computer
programmer doesnt need knowledge of hardware - can focus on problem being solved
uses english-like statements, easier for people to process
can use an IDE to code in high-level languages
low level languages
machine code is the lowest level language
other low level languages such as assembly code work at the same level as machine code and may use mnemonics to represent each machine code instructions
low level languages benefits
low level code can use machine-specific functions bc it directly works with registers and the CPU
instructions can be executed faster
translated programmes use less memory
low level language disadvantages
difficult to understand
need to manipulate memory locations
machine dependent
error prone
programming languages
arduino language is high level bc it uses words from English
processor on the arduino executes the instructions which have been translated to 0s and 1s
machine code
instructions in the form of binary signals aka low level code
compiled vs interpreted languages
C based languages are compiled
python is interpreted
compilers
compile the whole code at once and produce:
an executable code file
error report
compiled programmes CAN be run without the compiler
single high level language statement might end up stores as several machine code instructions
benefits:
fast executionable code that runs directly on the processor
no need for translation software (platform independent)
source code cant be modified
disadvantages
more difficult to debug
comments/source code arent visible once compiled
future changes - code needs to be recompiled
interpreters
interpreter checks the code one line at a time and executes that line straight away and stops completely if an error is found
interpreted programs CANT be run without the interprester
a single high level language statement might mean executing several machine code in
benefits:
interpreting makes it easier to debug code as errors are displayed as soon as they are found
disadvantages:
speed of execution of program loops is slower as each line has to be interpreted individually every time its run
assemblers
whole low level programme is translated from mnemonics into one executable machine code programmme
a new, executable file is made
assembled CAN be used without the assmebler
byte code
byte code needs to be interpreted or compiled at runtime time, but it achieves platform independence
platform independence
your code can be run on any machine