Total Pageviews

Friday, December 4, 2026

SCRATCH + POWERPOINT TEST 2

ONLINE COMPUTER EXAMINATION

Scratch Programming & PowerPoint Presentation

60 Questions | 60 Marks | 60 Minutes

CREATED BY BIJAN KRISHNA PAUL

Student Registration

Instructions:
  • Total 60 questions: 30 MCQs and 30 assertion-reason questions.
  • Each question carries 1 mark.
  • Examination duration is 60 minutes.
  • Fullscreen mode is compulsory.
  • Leaving fullscreen or switching to another tab/window will automatically submit the examination.
  • Do not refresh or close the examination page.

class 6 SCRATCH AND POWER POINT PRESENTATION

ONLINE COMPUTER EXAMINATION

Scratch Programming & Visual Effects in Presentations

Time: 90 Minutes | Total Questions: 80

CREATED BY BIJAN KRISHNA PAUL

Student Registration

Please enter your details carefully before starting the examination.

Examination Instructions
  • Total questions: 80.
  • Time allowed: 90 minutes.
  • Every question carries 1 mark. Maximum marks: 80.
  • Do not refresh, close, or switch tabs during the examination.
  • The test will automatically submit if fullscreen mode is exited or the page becomes hidden.
  • Ensure your browser allows fullscreen mode.

CLASS 6 MCQ CHAPTER -6 SCRATCH ONLINE TEST

🎮 CLASS 6 COMPUTER EXAMINATION

SCRATCH PROGRAMMING

MCQ | FILL IN THE BLANKS | TRUE OR FALSE

💻 Total Marks: 80

📋 EXAMINATION INSTRUCTIONS

  • Section A: 30 MCQs (30 marks)
  • Section B: 30 Fill in the Blanks (30 marks)
  • Section C: 20 True or False (20 marks)
  • Total Questions: 80
  • Each question carries 1 mark.
  • No negative marking.
  • Submit the examination to calculate your marks.

SECTION A: MULTIPLE CHOICE QUESTIONS (30 MARKS)

SECTION B: FILL IN THE BLANKS (30 MARKS)

SECTION C: TRUE OR FALSE (20 MARKS)

Check your answers before submitting.

🎉 EXAMINATION RESULT

CLASS 6 MCQ CHAPTER -5 POWER POINT PRESENTATION ONLINE TEST

💻 CLASS 6 COMPUTER EXAMINATION

MICROSOFT POWERPOINT PRESENTATION

MCQ | Fill in the Blanks | True or False

📚 Total Marks: 50

📋 Examination Instructions

  • Section A: 25 MCQs (25 marks)
  • Section B: 15 Fill in the Blanks (15 marks)
  • Section C: 10 True or False (10 marks)
  • Total Questions: 50
  • Each question carries 1 mark.
  • No negative marking.
  • Submit to see your result and answer review.

SECTION A: MULTIPLE CHOICE QUESTIONS (25 MARKS)

SECTION B: FILL IN THE BLANKS (15 MARKS)

SECTION C: TRUE OR FALSE (10 MARKS)

Check your answers before submitting.

🎉 EXAMINATION RESULT

Wednesday, December 2, 2026

TWO DIMENSIONAL RUN LENGTH ENCODING(RAC METHOD)

RELATIVE ADDRESS CODING (RAC)

Two-Dimensional Run-Length Coding

Digital Image Processing | Binary Image Compression

1. Introduction

Relative Address Coding (RAC) is a two-dimensional run-length coding technique used for binary image compression. It is based on tracking the binary transitions that begin and end each black and white run.

In ordinary one-dimensional RLE, we encode consecutive identical pixel values by storing their values and run lengths. In RAC, the transition positions in the current row are encoded by comparing them with corresponding transitions in the previous row.

This use of information from the previous row makes RAC a two-dimensional coding approach.

RAC = Coding binary transition positions using relative distances
Main concept: Instead of independently encoding every run length, RAC uses the spatial relationship between transitions in two consecutive rows.

2. Why is RAC Required?

Consider a binary image containing text, diagrams or large black-and-white regions. The positions of transitions in neighbouring rows may be similar.

If the current row has a transition close to a similar transition in the previous row, it may be more efficient to encode the relative distance rather than its absolute position.

Previous row

Contains already processed binary transitions.

Current row

Contains the transitions that are being encoded.

Relative distance

Measures the relationship between transitions in the two rows.

RAC is particularly useful when binary patterns in neighbouring rows have related transition positions.

3. Understanding the Symbols in Figure 8.17

SymbolMeaning
cCurrent transition in the current row.
eLast transition of the current row.
c′First similar transition beyond e, in the previous row.
ecDistance from e to c.
cc′Distance from c to c′.
dDistance selected for RAC coding.

Visual understanding

Previous row

000111001100

Current row

001110011000

Illustrative binary rows only; the actual positions of transitions must be identified from the image.

A transition occurs when the binary pixel value changes from 0 to 1 or from 1 to 0.

4. Important Distance Calculations

According to Gonzalez and Woods, two distances are considered for the current transition c.

A. Distance ec

ec is the distance from the current transition c to the last transition e of the current line.

ec = Distance between e and c

B. Distance cc′

cc′ is the distance from c to the first similar transition beyond e, denoted by c′, in the previous line.

cc′ = Distance between c and c′

C. Selection of RAC distance

The smaller of the two distances is selected.

d = min(ec, cc′)

There are two cases:

Case 1

ec ≤ cc′

Select d = ec. The current-line distance is encoded.

Case 2

cc′ < ec

Select d = cc′. The direction of c′ (left or right) is also encoded.

5. RAC Coding Table – Figure 8.17

The following table reproduces the coding structure shown in the textbook screenshot.

Distance measuredDistanceCode
cc′00
ec or cc′ (left)1100
cc′ (right)1101
ecd (d > 1)111 h(d)
cc′ (c′ to left)d (d > 1)1100 h(d)
cc′ (c′ to right)d (d > 1)1101 h(d)
Remember: For d = 0, the code is 0. For d = 1, the code depends on whether the distance is ec, cc′ to the left, or cc′ to the right.

6. Understanding the Variable-Length Code h(d)

For distances greater than 1, RAC uses a variable-length code h(d). The distance is first placed into a range. A prefix identifies the range, and the remaining bits represent the offset within that range.

Distance rangePrefixOffset bitsh(d)
1 – 4020 XX
5 – 2010410 XXXX
21 – 841106110 XXXXXX
85 – 340111081110 XXXXXXXX
341 – 1364111101011110 XXXXXXXXXX
1365 – 546011111012111110 XXXXXXXXXXXX

How to calculate h(d)

For each range, subtract the first value of that range to obtain the offset. Convert the offset into binary using the specified number of bits, then attach the range prefix.

h(d) = Range prefix + Binary offset
RangeOffset calculationOffset width
1–4d − 12 bits
5–20d − 54 bits
21–84d − 216 bits
85–340d − 858 bits
341–1364d − 34110 bits
1365–5460d − 136512 bits
The h(d) range representation is used for d greater than 1 in the RAC cases above. The special cases d = 0 and d = 1 have their own codes.

7. Numerical Example 1 – From the Textbook Principle

Suppose the measured distances are:

ec = 8
cc′ = 4

Assume c′ is located to the left of c.

Step 1: Compare the distances

ec = 8,   cc′ = 4

Step 2: Select the smaller distance

d = min(8,4) = 4

Since cc′ is smaller than ec, the relative distance to c′ is selected.

Step 3: Determine the direction

c′ is to the left of c. Therefore, the appropriate code prefix is:

1100

Step 4: Calculate h(4)

Distance 4 belongs to the range 1–4.

Offset = d − 1 = 4 − 1 = 3

Convert 3 into a 2-bit binary number:

3 = (11)₂

Range prefix for 1–4 is 0.

h(4) = 0 + 11 = 011

Step 5: Generate the final RAC code

RAC code = 1100 + 011
1100011
Final answer: RAC code = 1100011. This is the example reported in the accompanying lecture material for ec = 8, cc′ = 4, with c′ to the left.

8. Numerical Example 2 – Current-Line Distance Selected

Suppose:

ec = 3,   cc′ = 7

Step 1: Select the smaller distance

d = min(3,7) = 3

Since ec is smaller, the current-line distance is selected.

Step 2: Find h(3)

Distance 3 belongs to range 1–4.

Offset = 3 − 1 = 2
2 in 2-bit binary = 10
h(3) = 0 + 10 = 010

Step 3: Apply the ec code prefix

RAC code = 111 + h(3)
111010

Final RAC code = 111010.

9. Numerical Example 3 – Right Direction

Suppose:

ec = 12,   cc′ = 6

Assume c′ is to the right of c.

Step 1: Select the smaller distance

d = min(12,6) = 6

Step 2: Calculate h(6)

6 belongs to the range 5–20.

Offset = 6 − 5 = 1
1 in 4-bit binary = 0001
h(6) = 10 + 0001 = 100001

Step 3: Apply the right-direction prefix

RAC code = 1101 + 100001
1101100001

Final RAC code = 1101100001.

10. Special Cases: d = 0 and d = 1

ConditionMeaningRAC code
cc′ = 0c is directly below the similar transition c′.0
ec = 1Current-line distance is one.100
cc′ = 1, c′ leftSimilar previous-row transition is one position to the left.100
cc′ = 1, c′ rightSimilar previous-row transition is one position to the right.101
When d = 1, the code identifies the measured-distance case. The encoder/decoder must follow the transition-position convention in the RAC scheme.

11. RAC Encoding Procedure

  1. Take the binary image and process it row by row.
  2. Use the previous row as the reference row.
  3. Identify the binary transitions in the current row.
  4. For the current transition c, determine the last transition e in the current row.
  5. Find the first similar transition c′ beyond e in the previous row.
  6. Calculate ec and cc′.
  7. Compare the two distances and select the smaller distance d.
  8. If d = 0 or d = 1, use the appropriate special code.
  9. If d is greater than 1, calculate h(d).
  10. Use the prefix for ec, cc′ left, or cc′ right.
  11. Repeat for the required transitions and rows.

Algorithm – Pseudocode

Algorithm RAC_Encode

For each current image row:

    Select the previous row as reference.

    Identify binary transitions in current row.

    For each current transition c:

        Find the last transition e
        in the current row.

        Find the first similar transition c'
        beyond e in the previous row.

        Calculate:
            ec = distance(e, c)
            cc' = distance(c, c')

        If ec <= cc':
            d = ec

            If d = 0:
                output special code 0

            Else if d = 1:
                output special code 100

            Else:
                output 111 + h(d)

        Else:
            d = cc'

            If d = 1 and c' is left:
                output 100

            Else if d = 1 and c' is right:
                output 101

            Else if d > 1 and c' is left:
                output 1100 + h(d)

            Else if d > 1 and c' is right:
                output 1101 + h(d)

Continue until all required transitions
have been encoded.

This is a teaching outline of the decision rules in Figure 8.17, not a complete standards-compliant RAC file encoder. Full image encoding also requires precise transition-search, row-boundary and initialization conventions.

12. Interactive RAC Code Calculator

Enter the two distances and choose the direction of c′. The calculator selects d, calculates h(d), and generates the RAC code according to the textbook table.

Enter the distances and click Calculate RAC Code.

13. Advantages of RAC

  • Uses information from two consecutive image rows.
  • Exploits similarity between transition positions in neighbouring rows.
  • Uses variable-length codes for representing distances.
  • Can reduce the number of bits needed for suitable binary images.
  • Useful for images containing structured black-and-white patterns.
  • Encodes spatial relationships between transitions.

14. Disadvantages of RAC

  • More complex than simple one-dimensional RLE.
  • Requires transition detection and reference-row information.
  • Encoding and decoding require careful tracking of positions.
  • Compression efficiency depends on the relationship between neighbouring rows.
  • Less suitable for images without useful binary transition patterns.
  • Requires correct handling of image boundaries and initial reference rows.

15. RLE vs RAC

FeatureOrdinary RLERelative Address Coding
DimensionUsually one-dimensional scanTwo-dimensional row-based coding
Basic informationPixel value and run lengthRelative positions of binary transitions
Previous rowNot normally requiredUsed as reference
Distance codingRun countec and cc′ distances
Code structureValue-count pairsSpecial prefixes and h(d)
ComplexitySimpleMore complex

16. Important Examination Questions

  1. What is Relative Address Coding?
  2. Explain the principle of two-dimensional run-length coding.
  3. Define ec and cc′ in RAC.
  4. Explain the selection rule d = min(ec, cc′).
  5. Write the RAC coding table given in Figure 8.17.
  6. What is the purpose of h(d)?
  7. Explain the variable-length distance ranges used in RAC.
  8. Calculate the RAC code when ec = 8, cc′ = 4 and c′ is to the left.
  9. Explain the special coding cases for d = 0 and d = 1.
  10. Differentiate between ordinary RLE and RAC.

17. Conclusion

Relative Address Coding is a two-dimensional extension of run-length coding. It tracks binary transitions in the current row and compares their positions with similar transitions in the previous row. By selecting the smaller of ec and cc′ and representing the selected distance with special prefixes and h(d), RAC can exploit similarities between neighbouring rows of a binary image.

18. References

  1. Rafael C. Gonzalez and Richard E. Woods, Digital Image Processing, 2nd Edition, Chapter 8 – Image Compression, Two-Dimensional Run-Length Coding, Figure 8.17.
  2. Gonzalez and Woods – Chapter 8, Figure 8.17: Relative Address Coding
  3. Digital Image Processing – 1-D and 2-D Run-Length Coding lecture material

The coding table and distance definitions follow the supplied textbook screenshot. Numerical examples are educational calculations based on that table.

19. Interactive RAC Calculator – Point Input and Step-by-Step Output

Enter the horizontal positions of the three transition points. The calculator will automatically calculate the distances and generate the RAC code.

Coordinate convention: All three positions are horizontal pixel positions measured from the same left-hand reference. Point e and point c belong to the current row. Point c′ belongs to the previous row.

Point e

Last transition in the current row.

Point c

Current transition in the current row.

Point c′

Similar transition in the previous row.

Waiting for point input...

Enter e, c and c′, then click Generate RAC Output.

Try this example: e = 10, c = 18, c′ = 14.

Expected distances: ec = 8 and cc′ = 4.

Since cc′ is smaller and c′ is to the left, the final RAC code is 1100011.