CS THEORY - LOGIC, DATA TRANSMISSION, ERROR CHECKING, PROGRAMMING LANGUAGES AND TRANSLATORS

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/43

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

44 Terms

1
New cards

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.

2
New cards

NOT gate

a logic gate that inverts the input signal, producing a binary output that is the opposite of the input.

<p>a logic gate that inverts the input signal, producing a binary output that is the opposite of the input.  </p>
3
New cards

AND gate

a logic gate that outputs a binary high (1) signal only when all of its inputs are binary high (1).

<p>a logic gate that outputs a binary high (1) signal only when all of its inputs are binary high (1).</p>
4
New cards

OR gate

a logic gate that outputs a binary high (1) signal if at least one of its inputs is binary high (1).

<p>a logic gate that outputs a binary high (1) signal if at least one of its inputs is binary high (1). </p>
5
New cards

NAND gate

a logic gate that outputs a binary low (0) signal only when all of its inputs are binary high (1).

<p>a logic gate that outputs a binary low (0) signal only when all of its inputs are binary high (1). </p>
6
New cards

NOR gate

a logic gate that outputs a binary low (0) signal if at least one of its inputs is binary high (1).

<p>a logic gate that outputs a binary low (0) signal if at least one of its inputs is binary high (1). </p>
7
New cards

XOR gate

a logic gate that outputs a binary high (1) signal only when the number of its binary high inputs is odd.

<p>a logic gate that outputs a binary high (1) signal only when the number of its binary high inputs is odd. </p>
8
New cards

simplex transmission

one direction - sending data to or recieving data from a device

9
New cards

half duplex data transmission

sending data to and from devices, both devices but only one at a time

10
New cards

full duplex (duplex)

both directions at the same time

11
New cards

interface

point at which two computers systems communicate

12
New cards

serial interface

interface to allow serial communication between the microcontroller or microprocessor using a serial cable

13
New cards

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

14
New cards

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

15
New cards

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.

16
New cards

format of a packet

frame

17
New cards

frame formats

defined by the protocol being used

18
New cards

USB

universal serial bus

19
New cards

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

20
New cards

USB-C

  • symmetrically double pins

    • can be inserted either way

  • more power than older USBs

  • most modern protocols can run over USB-c

21
New cards

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

22
New cards

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

23
New cards

why is parallel not used more widely

  • signal degradation - long distances

  • timing issues - data may be wrongly alligned

  • complex design - take up more space

24
New cards

port

connection point or interface between a computer and en external or internal hardware device

25
New cards

software port

a virtual point where network connections start and end

26
New cards

protocols

sets of rules and standards for how data is transmitted and received over a network

27
New cards

what do protocols determine

  • how data packets are structured

  • encoding methods

  • error detection

  • addressing

  • session persistance

  • security

28
New cards

IDE

integrated development environment - where software programs are written eg pycharm, IDLE

29
New cards

bootloader (arduino)

piece of software that allows you to upload code you write to the arduino

30
New cards

open source hardware

where anyone can see the design specification of a physical object

31
New cards

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

<ul><li><p>odd/even parity is agreed on by the communicating devices</p></li><li><p>odd parity means in total there will be an odd number of 1s</p></li><li><p>in every byte, 7 bits are data and 1 bit is the parity bit</p></li><li><p>the parity bit allows adjustment so the overall number of 1s adds to the agreed parity</p><ul><li><p>if parity is incorrect, an error is detected</p></li></ul></li></ul><p></p>
32
New cards

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

<ul><li><p>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</p></li><li><p>each packet has a place where it stores a numerical value determining how much longer it should continue to move through the network</p></li><li><p>every time a router receives a packet, it subtracts 1 from the TTL (common no for TTL is 64)</p><ul><li><p>if TTL is 0, the router will discard the packet and send a message back to the originating host</p></li></ul></li></ul><p></p>
33
New cards

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

34
New cards

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

35
New cards

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

36
New cards

low level language disadvantages

  • difficult to understand

  • need to manipulate memory locations

  • machine dependent

  • error prone

37
New cards

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

38
New cards

machine code

instructions in the form of binary signals aka low level code

39
New cards

compiled vs interpreted languages

  • C based languages are compiled

  • python is interpreted

40
New cards

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

41
New cards

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

42
New cards

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

43
New cards

byte code

byte code needs to be interpreted or compiled at runtime time, but it achieves platform independence

44
New cards

platform independence

your code can be run on any machine