SlideShare a Scribd company logo
1 of 20
PHY 201 (Blum) 1
Shift registers and Floating
Point Numbers
Chapter 11 in Tokheim
PHY 201 (Blum) 2
What are they?
Recall that a register is a small piece of
memory that holds values.
In addition to holding values, a shift
register performs a simple operation on
the values; it moves them to the left or
to the right.
PHY 201 (Blum) 3
Example
0 1 0 1 0 1 1 1
1 0 1 0 1 1 1 0
0 1 0 1 1 1 0 1
1 0 1 1 1 0 1 0
Serial
input
Serial
output Shift register
PHY 201 (Blum) 4
Parallel loading register
PHY 201 (Blum) 5
Register
On the previous slide, the input of a
flip-flop is selected from two possible
choices
The output of the same flip-flop
The data switch above
Recall that selecting from one of two
inputs is done by a 2-to-1 MUX.
The load line serves as the address/select
input.
PHY 201 (Blum) 6
When Load is high, we are selecting the data switches to be the
data input. So when we go through a positive edge of the clock,
we are writing the value from the data switches to the register.
PHY 201 (Blum) 7
When Load is low, we are selecting the flip-flop’s output to be
the data input. So when we go through a positive clock edge, we
are writing the value from the flip-flop to the flip-flop – thus
keeping the value the same as before (holding).
PHY 201 (Blum) 8
Register  Shift Register
We can adapt the previous circuit to make a
shift register.
Instead of having one of the two possible inputs
for a flip-flop come from the output of the same
flip-flop, we can change this to having that input
come from an adjacent flip-flop.
Then if when the load input is low and we go
through a positive clock edge, the effect is not to
hold the values of the register but to shift them.
This is part of the lab.
PHY 201 (Blum) 9
On the ends
If one shifts from the right to the left, then
the input to the rightmost flip-flop does not
come from an adjacent flip-flop during the
shift operation. There are several options
Data switch input
Always 1
Always 0
Use leftmost output to form a ring
PHY 201 (Blum) 10
How are shift registers used?
Modems
Cyclic Redundancy Check (CRC)
Multiplication
Adding floats
PHY 201 (Blum) 11
Modems
A modem (Modulator-Demodulator) takes a
signal from a computer and places it on a
transmission line.
A transmitting modem modulates, that is,
converts a digital signal from a computer to a
pseudo-analog signal more appropriate for a
transmission line.
The receiving modem demodulates, that is,
converts the pseudo-analog signal back into
digital form.
PHY 201 (Blum) 12
Modems (Cont.)
But the aspect of modems relevant here is
that
The transmitting modem converts parallel data to
serial.
The receiving modem converts serial data into
parallel form.
Inside the computer, data that moves around
as words on parallel cables having a
connection for each bit in the word.
The transmission lines are longer and require
data to be sent serially (one bit at a time).
PHY 201 (Blum) 13
Parallel to Serial
1 0 1 0 0
To leave the computer, data
moves into register in parallel,
several bits at once.
Data then moves out of
the register serially, one
bit at a time.
PHY 201 (Blum) 14
Serial to Parallel
1 0 1 0 0
To enter the
computer, data
enters the register in
serial, one bit at a
time.
Data then moves out of the
register in parallel.
DEMO!
PHY 201 (Blum) 15
Cyclic Redundancy Check
In order to check for errors that may occur
during transmission, the sender calculates a
number, a cyclic redundancy check. The
receiver does the same calculation. If they
agree, then presumably no error occurred in
transmission.
Actually the receiver does a calculation that
includes the sender’s CRC as part of the data
and should get an answer of zero.
It’s easier electronically to see if series of bits
corresponds to zero.
PHY 201 (Blum) 16
CRC
Any mathematical operation performed on the
transmitted data could serve as a check.
Another common calculation is summing, then it is
called a checksum.
The calculation should not be time consuming.
Think of CRC as a funny kind of division, the
remainder from the division is the check.
It’s not ordinary division, but a strange kind of
division that is easy to realize electronically.
PHY 201 (Blum) 17
CRC = Shift register + XORs
Basically one has a shift register with a few
excluded OR gates inserted in strategic positions.
PHY 201 (Blum) 18
0 0
 0 0  11000001010
1 1
 0 0 
0 0
 0 1 
0001010
001010
0 0
 1 0  01010
PHY 201 (Blum) 19
0 1
 0 0  1010
1 0
 0 1  010
1 0
 1 1  10
1 1
 1 0  0
0 1
 0 1 
PHY 201 (Blum) 20
Multiplication: Shift and add
1 0 0 1
 1 0 1 1
1 0 0 1
1 0 0 1
0 0 0 0
+ 1 0 0 1
1 1 0 0 0 1 1
shift
shift

More Related Content

Similar to shift4.ppt

Introduction to pic
Introduction to picIntroduction to pic
Introduction to pic
PRADEEP
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
John Todora
 

Similar to shift4.ppt (20)

8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt8051 MMD Chapter 1.ppt
8051 MMD Chapter 1.ppt
 
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence CounterLab 9 D-Flip Flops: Shift Register and Sequence Counter
Lab 9 D-Flip Flops: Shift Register and Sequence Counter
 
Basic_Introduction_to_Microcontroller.ppt
Basic_Introduction_to_Microcontroller.pptBasic_Introduction_to_Microcontroller.ppt
Basic_Introduction_to_Microcontroller.ppt
 
FYBSC IT Digital Electronics Unit V Chapter II Shift Register
FYBSC IT Digital Electronics Unit V Chapter II Shift RegisterFYBSC IT Digital Electronics Unit V Chapter II Shift Register
FYBSC IT Digital Electronics Unit V Chapter II Shift Register
 
Automation and Robotics 20ME51I_Week_2_Practicals.pdf
Automation and Robotics 20ME51I_Week_2_Practicals.pdfAutomation and Robotics 20ME51I_Week_2_Practicals.pdf
Automation and Robotics 20ME51I_Week_2_Practicals.pdf
 
Pdf tp3076 national
Pdf tp3076 nationalPdf tp3076 national
Pdf tp3076 national
 
DLD4.pdf
DLD4.pdfDLD4.pdf
DLD4.pdf
 
Commputer organization and assembly .ppt
Commputer organization and assembly .pptCommputer organization and assembly .ppt
Commputer organization and assembly .ppt
 
Peripheral 8245,16550&8237 dma controller
Peripheral 8245,16550&8237 dma controllerPeripheral 8245,16550&8237 dma controller
Peripheral 8245,16550&8237 dma controller
 
Register counters.readonly
Register counters.readonlyRegister counters.readonly
Register counters.readonly
 
Lecture 12.pptx
Lecture 12.pptxLecture 12.pptx
Lecture 12.pptx
 
Serial transmission
Serial transmissionSerial transmission
Serial transmission
 
Dns module3 p3
Dns module3 p3Dns module3 p3
Dns module3 p3
 
Dns module3 p3_shift registers
Dns module3 p3_shift registersDns module3 p3_shift registers
Dns module3 p3_shift registers
 
Introduction to pic
Introduction to picIntroduction to pic
Introduction to pic
 
Combinational logic circuits design and implementation
Combinational logic circuits design and implementationCombinational logic circuits design and implementation
Combinational logic circuits design and implementation
 
Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)Arithmetic Logic Unit (ALU)
Arithmetic Logic Unit (ALU)
 
Chapter 6 - Introduction to 8085 Instructions
Chapter 6 - Introduction to 8085 InstructionsChapter 6 - Introduction to 8085 Instructions
Chapter 6 - Introduction to 8085 Instructions
 
10 chapter05 counters_fa14
10 chapter05 counters_fa1410 chapter05 counters_fa14
10 chapter05 counters_fa14
 
Ladder Intro Tutorial
Ladder Intro TutorialLadder Intro Tutorial
Ladder Intro Tutorial
 

Recently uploaded

electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
benjamincojr
 
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
Madan Karki
 

Recently uploaded (20)

Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdfInvolute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
Involute of a circle,Square, pentagon,HexagonInvolute_Engineering Drawing.pdf
 
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
NO1 Best Powerful Vashikaran Specialist Baba Vashikaran Specialist For Love V...
 
Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1Research Methodolgy & Intellectual Property Rights Series 1
Research Methodolgy & Intellectual Property Rights Series 1
 
5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...5G and 6G refer to generations of mobile network technology, each representin...
5G and 6G refer to generations of mobile network technology, each representin...
 
Low Altitude Air Defense (LAAD) Gunner’s Handbook
Low Altitude Air Defense (LAAD) Gunner’s HandbookLow Altitude Air Defense (LAAD) Gunner’s Handbook
Low Altitude Air Defense (LAAD) Gunner’s Handbook
 
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message QueuesLinux Systems Programming: Semaphores, Shared Memory, and Message Queues
Linux Systems Programming: Semaphores, Shared Memory, and Message Queues
 
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdflitvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
litvinenko_Henry_Intrusion_Hong-Kong_2024.pdf
 
electrical installation and maintenance.
electrical installation and maintenance.electrical installation and maintenance.
electrical installation and maintenance.
 
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
NEWLETTER FRANCE HELICES/ SDS SURFACE DRIVES - MAY 2024
 
Autodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptxAutodesk Construction Cloud (Autodesk Build).pptx
Autodesk Construction Cloud (Autodesk Build).pptx
 
CLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference ModalCLOUD COMPUTING SERVICES - Cloud Reference Modal
CLOUD COMPUTING SERVICES - Cloud Reference Modal
 
Augmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptxAugmented Reality (AR) with Augin Software.pptx
Augmented Reality (AR) with Augin Software.pptx
 
Basics of Relay for Engineering Students
Basics of Relay for Engineering StudentsBasics of Relay for Engineering Students
Basics of Relay for Engineering Students
 
handbook on reinforce concrete and detailing
handbook on reinforce concrete and detailinghandbook on reinforce concrete and detailing
handbook on reinforce concrete and detailing
 
Lab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docxLab Manual Arduino UNO Microcontrollar.docx
Lab Manual Arduino UNO Microcontrollar.docx
 
What is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, FunctionsWhat is Coordinate Measuring Machine? CMM Types, Features, Functions
What is Coordinate Measuring Machine? CMM Types, Features, Functions
 
"United Nations Park" Site Visit Report.
"United Nations Park" Site  Visit Report."United Nations Park" Site  Visit Report.
"United Nations Park" Site Visit Report.
 
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdfALCOHOL PRODUCTION- Beer Brewing Process.pdf
ALCOHOL PRODUCTION- Beer Brewing Process.pdf
 
The Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptxThe Entity-Relationship Model(ER Diagram).pptx
The Entity-Relationship Model(ER Diagram).pptx
 
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdfInstruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
Instruct Nirmaana 24-Smart and Lean Construction Through Technology.pdf
 

shift4.ppt

  • 1. PHY 201 (Blum) 1 Shift registers and Floating Point Numbers Chapter 11 in Tokheim
  • 2. PHY 201 (Blum) 2 What are they? Recall that a register is a small piece of memory that holds values. In addition to holding values, a shift register performs a simple operation on the values; it moves them to the left or to the right.
  • 3. PHY 201 (Blum) 3 Example 0 1 0 1 0 1 1 1 1 0 1 0 1 1 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 0 1 0 Serial input Serial output Shift register
  • 4. PHY 201 (Blum) 4 Parallel loading register
  • 5. PHY 201 (Blum) 5 Register On the previous slide, the input of a flip-flop is selected from two possible choices The output of the same flip-flop The data switch above Recall that selecting from one of two inputs is done by a 2-to-1 MUX. The load line serves as the address/select input.
  • 6. PHY 201 (Blum) 6 When Load is high, we are selecting the data switches to be the data input. So when we go through a positive edge of the clock, we are writing the value from the data switches to the register.
  • 7. PHY 201 (Blum) 7 When Load is low, we are selecting the flip-flop’s output to be the data input. So when we go through a positive clock edge, we are writing the value from the flip-flop to the flip-flop – thus keeping the value the same as before (holding).
  • 8. PHY 201 (Blum) 8 Register  Shift Register We can adapt the previous circuit to make a shift register. Instead of having one of the two possible inputs for a flip-flop come from the output of the same flip-flop, we can change this to having that input come from an adjacent flip-flop. Then if when the load input is low and we go through a positive clock edge, the effect is not to hold the values of the register but to shift them. This is part of the lab.
  • 9. PHY 201 (Blum) 9 On the ends If one shifts from the right to the left, then the input to the rightmost flip-flop does not come from an adjacent flip-flop during the shift operation. There are several options Data switch input Always 1 Always 0 Use leftmost output to form a ring
  • 10. PHY 201 (Blum) 10 How are shift registers used? Modems Cyclic Redundancy Check (CRC) Multiplication Adding floats
  • 11. PHY 201 (Blum) 11 Modems A modem (Modulator-Demodulator) takes a signal from a computer and places it on a transmission line. A transmitting modem modulates, that is, converts a digital signal from a computer to a pseudo-analog signal more appropriate for a transmission line. The receiving modem demodulates, that is, converts the pseudo-analog signal back into digital form.
  • 12. PHY 201 (Blum) 12 Modems (Cont.) But the aspect of modems relevant here is that The transmitting modem converts parallel data to serial. The receiving modem converts serial data into parallel form. Inside the computer, data that moves around as words on parallel cables having a connection for each bit in the word. The transmission lines are longer and require data to be sent serially (one bit at a time).
  • 13. PHY 201 (Blum) 13 Parallel to Serial 1 0 1 0 0 To leave the computer, data moves into register in parallel, several bits at once. Data then moves out of the register serially, one bit at a time.
  • 14. PHY 201 (Blum) 14 Serial to Parallel 1 0 1 0 0 To enter the computer, data enters the register in serial, one bit at a time. Data then moves out of the register in parallel. DEMO!
  • 15. PHY 201 (Blum) 15 Cyclic Redundancy Check In order to check for errors that may occur during transmission, the sender calculates a number, a cyclic redundancy check. The receiver does the same calculation. If they agree, then presumably no error occurred in transmission. Actually the receiver does a calculation that includes the sender’s CRC as part of the data and should get an answer of zero. It’s easier electronically to see if series of bits corresponds to zero.
  • 16. PHY 201 (Blum) 16 CRC Any mathematical operation performed on the transmitted data could serve as a check. Another common calculation is summing, then it is called a checksum. The calculation should not be time consuming. Think of CRC as a funny kind of division, the remainder from the division is the check. It’s not ordinary division, but a strange kind of division that is easy to realize electronically.
  • 17. PHY 201 (Blum) 17 CRC = Shift register + XORs Basically one has a shift register with a few excluded OR gates inserted in strategic positions.
  • 18. PHY 201 (Blum) 18 0 0  0 0  11000001010 1 1  0 0  0 0  0 1  0001010 001010 0 0  1 0  01010
  • 19. PHY 201 (Blum) 19 0 1  0 0  1010 1 0  0 1  010 1 0  1 1  10 1 1  1 0  0 0 1  0 1 
  • 20. PHY 201 (Blum) 20 Multiplication: Shift and add 1 0 0 1  1 0 1 1 1 0 0 1 1 0 0 1 0 0 0 0 + 1 0 0 1 1 1 0 0 0 1 1 shift shift