Back to 课程

Computer Science GCES AQA

0% Complete
0/0 Steps
  1. Representing Algorithms Aqa
    4 主题
  2. Efficiency Of Algorithms Aqa
    1 主题
  3. Searching Algorithms Aqa
    3 主题
  4. Sorting Algorithms Aqa
    3 主题
  5. Data Types Aqa
    1 主题
  6. Programming Concepts Aqa
    5 主题
  7. Arithmetic Relational And Boolean Operations Aqa
    1 主题
  8. Data Structures Aqa
    3 主题
  9. String Manipulation Aqa
    1 主题
  10. Random Number Generation Aqa
    1 主题
  11. Structured Programming Aqa
    2 主题
  12. Robust And Secure Programming Aqa
    4 主题
  13. Number Bases Aqa
    2 主题
  14. Converting Between Number Bases Aqa
    3 主题
  15. Units Of Information Aqa
    9 主题
  16. Hardware And Software Aqa
    4 主题
  17. Boolean Logic Aqa
    3 主题
  18. Programming Languages And Translators Aqa
    2 主题
  19. Cpu Architecture Performance And Embedded Systems Aqa
    4 主题
  20. Memory Aqa
    2 主题
  21. Secondary Storage Aqa
    3 主题
  22. Fundamentals Of Computer Networks Aqa
    8 主题
  23. Fundamentals Of Cyber Security Aqa
    1 主题
  24. Methods Of Preventing Cyber Security Threats Aqa
    1 主题
  25. Relational Databases Aqa
    2 主题
  26. Ethical Legal And Environmental Impacts Aqa
    2 主题
课 Progress
0% Complete

Exam code:8525

Binary Shifts

What is a binary shift?

  • A binary shift is how a computer system performs basic multiplication and division

  • Binary digits are moved left or right a set number of times

  • A left shift multiplies a binary number by 2 (x2)

  • A right shift divides a binary number by 2 (/2)

  • A shift can move more than one place at a time, the principle remains the same

  • A left shift of 2 places would multiply the original binary number by 4 (x4)

How do you perform a left shift of 1?

  • Here is the binary representation of the denary number 40

Binary representation of the decimal number 40 using an 8-bit system, showing bits 0 for 128, 64, 16, 4, 2, 1 and bits 1 for 32, 8.
  • To perform a left binary shift of 1, we move each bit 1 place to the left

  • The digit in the 128 column will move left causing an overflow error

  • The 1 column becomes empty so is filled with a 0

A table showing binary and decimal equivalence. The top row numbers (128 to 1) highlight binary place values. Two rows of binary digits add up to 40 and 80.
  • The original binary representation of denary 40 (32+8) has multiplied by 2 and became 80 (64+16)

How do you perform a left shift of 2?

  • Here is the binary representation of the denary number 28

A binary table showing bit values for 128, 64, 32, 16, 8, 4, 2, and 1 in blue, with corresponding bits 0, 0, 0, 1, 1, 1, 1, 0 in red below.
  • To perform a left binary shift of 2, we move each bit 2 place to the left

  • The digit in the 128 and 64 column will move left causing an overflow error

  • The 1 and 2 column become empty so are filled with a 0

A binary table shows the values 128 to 1 in blue. Two rows: top with binary "0011100", equating to 28, and bottom with "0111000", equating to 112, highlighted in red.
  • The original binary representation of denary 28 (16+8+4) has multiplied by 4 and became 112 (64+32+16)

How do you perform a right shift of 1?

  • Here is the binary representation of the denary number 40

A binary number table showing columns labeled 128, 64, 32, 16, 8, 4, 2, and 1. Below them are corresponding values 0, 0, 1, 0, 1, 0, 0, and 0.
  • To perform a right binary shift of 1, we move each bit 1 place to the right

  • The digit in the 1 column will move right causing an underflow error

  • The 128 column becomes empty so is filled with a 0

A table with two binary rows under columns labeled 128 to 1, totaling 40 and 20, showing binary to decimal conversion. The first row reads 00101010, the second 00010100.
  • The original binary representation of denary 40 (32+8) has divided by 2 and became 20 (16+4)

How do you perform a right shift of 2?

  • Here is the binary representation of the denary number 200

A table showing binary representation of the number 201: top row displays place values (128, 64, 32, 16, 8, 4, 2, 1) and bottom row displays corresponding binary digits (1, 1, 0, 0, 1, 0, 0, 1).
  • To perform a right binary shift of 2, we move each bit 2 places to the right

  • The digits in the 1 and 2 columns will move right causing an underflow error

  • The 128 and 64 columns become empty so are filled with a 0

<img alt=”A binary to decimal conversion table: two rows of binary numbers, with highlighted values showing 200 in the first row and 50 in the second row.” class=”ContentBlock_figure__vJw2q” data-nimg=”1″ decoding=”async” height=”145″ sizes=”(max-width: 320px) 320w, (max-width: 640px) 640w, (max-width: 960px) 960w, (max-width: 1280px) 1280w, 1920w” src=”https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=3840/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png” srcset=”https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=16/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 16w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=32/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 32w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=48/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 48w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=64/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 64w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=96/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 96w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=128/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 128w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=256/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 256w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=384/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 384w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=640/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 640w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=750/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 750w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=828/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 828w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=1080/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 1080w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=1200/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-binary-shifts.png 1200w, https://cdn.savemyexams.com/cdn-cgi/image/f=auto,width=1920/https://cdn.savemyexams.com/uploads/2024/08/45255_table-8-bi

Responses

您的邮箱地址不会被公开。 必填项已用 * 标注